Fixed up tests
This commit is contained in:
parent
b6f72994e5
commit
120a08cf19
@ -33,6 +33,8 @@ trunchecked(function()
|
|||||||
tassert_eq(editor.get_docs(), {doc, doc2})
|
tassert_eq(editor.get_docs(), {doc, doc2})
|
||||||
tassert_eq(window.get_docs(), {doc})
|
tassert_eq(window.get_docs(), {doc})
|
||||||
tassert_eq(window2.get_docs(), {doc2})
|
tassert_eq(window2.get_docs(), {doc2})
|
||||||
|
|
||||||
|
tassert(window2.close())
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function save_file(filename, content)
|
function save_file(filename, content)
|
||||||
|
@ -24,11 +24,11 @@ local function test_active_window()
|
|||||||
tassert(w1 ~= w2, 'old window != new window')
|
tassert(w1 ~= w2, 'old window != new window')
|
||||||
tassert(#editor.get_windows() == 2, 'two window')
|
tassert(#editor.get_windows() == 2, 'two window')
|
||||||
editor.set_active_window(w2)
|
editor.set_active_window(w2)
|
||||||
moo.spin_main_loop(0.1)
|
moo.spin_main_loop(0.3)
|
||||||
tassert(w2 == editor.get_active_window(), 'w2 == editor.get_active_window()')
|
tassert(w2 == editor.get_active_window(), 'w2 == editor.get_active_window()')
|
||||||
if _moo.os.name == 'posix' then
|
if _moo.os.name == 'posix' then
|
||||||
editor.set_active_window(w1)
|
editor.set_active_window(w1)
|
||||||
moo.spin_main_loop(0.1)
|
moo.spin_main_loop(0.3)
|
||||||
tassert(w1 == editor.get_active_window(), 'w1 == editor.get_active_window()')
|
tassert(w1 == editor.get_active_window(), 'w1 == editor.get_active_window()')
|
||||||
end
|
end
|
||||||
editor.close_window(w1)
|
editor.close_window(w1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user