Fixed up tests

This commit is contained in:
Yevgen Muntyan 2012-07-27 23:03:11 -07:00
parent b6f72994e5
commit 120a08cf19
2 changed files with 4 additions and 2 deletions

View File

@ -33,6 +33,8 @@ trunchecked(function()
tassert_eq(editor.get_docs(), {doc, doc2})
tassert_eq(window.get_docs(), {doc})
tassert_eq(window2.get_docs(), {doc2})
tassert(window2.close())
end)
function save_file(filename, content)

View File

@ -24,11 +24,11 @@ local function test_active_window()
tassert(w1 ~= w2, 'old window != new window')
tassert(#editor.get_windows() == 2, 'two window')
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()')
if _moo.os.name == 'posix' then
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()')
end
editor.close_window(w1)