diff options
Diffstat (limited to 'test/functional/legacy/excmd_spec.lua')
-rw-r--r-- | test/functional/legacy/excmd_spec.lua | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/test/functional/legacy/excmd_spec.lua b/test/functional/legacy/excmd_spec.lua index 549f412e24..65957d85de 100644 --- a/test/functional/legacy/excmd_spec.lua +++ b/test/functional/legacy/excmd_spec.lua @@ -4,11 +4,11 @@ local clear = helpers.clear local command = helpers.command local exec = helpers.exec local exec_lua = helpers.exec_lua +local expect_exit = helpers.expect_exit local feed = helpers.feed local funcs = helpers.funcs local iswin = helpers.iswin local meths = helpers.meths -local poke_eventloop = helpers.poke_eventloop local read_file = helpers.read_file local source = helpers.source local eq = helpers.eq @@ -94,8 +94,7 @@ describe(':confirm command dialog', function() {3:Save changes to "Xbar"?} | {3:[Y]es, (N)o, Save (A)ll, (D)iscard All, (C)ancel: }^ | ]]) - feed('A') - poke_eventloop() + expect_exit(100, feed, 'A') eq('foo2\n', read_file('Xfoo')) eq('bar2\n', read_file('Xbar')) @@ -133,8 +132,7 @@ describe(':confirm command dialog', function() {3:Save changes to "Xbar"?} | {3:[Y]es, (N)o, Save (A)ll, (D)iscard All, (C)ancel: }^ | ]]) - feed('D') - poke_eventloop() + expect_exit(100, feed, 'D') eq('foo2\n', read_file('Xfoo')) eq('bar2\n', read_file('Xbar')) @@ -195,8 +193,7 @@ describe(':confirm command dialog', function() {3:Save changes to "Xfoo"?} | {3:[Y]es, (N)o, (C)ancel: }^ | ]]) - feed('Y') - poke_eventloop() + expect_exit(100, feed, 'Y') eq('foo4\n', read_file('Xfoo')) eq('bar2\n', read_file('Xbar')) @@ -407,12 +404,12 @@ describe(':confirm command dialog', function() -- Try to write with read-only file permissions. funcs.setfperm('Xconfirm_write_ro', 'r--r--r--') - feed(':set noro | undo | confirm w\n') + feed(':set noro | silent undo | confirm w\n') screen:expect([[ foobar | {0:~ }| {1: }| - 1 change; before #1 0 seconds ago | + :set noro | silent undo | confirm w | {3:File permissions of "Xconfirm_write_ro" are read-only.} | {3:It may still be possible to write it.} | {3:Do you wish to try?} | @@ -423,7 +420,7 @@ describe(':confirm command dialog', function() screen:expect([[ foobar | {1: }| - 1 change; before #1 0 seconds ago | + :set noro | silent undo | confirm w | {3:File permissions of "Xconfirm_write_ro" are read-only.} | {3:It may still be possible to write it.} | {3:Do you wish to try?} | @@ -434,7 +431,7 @@ describe(':confirm command dialog', function() screen:expect([[ foobar | {1: }| - 1 change; before #1 0 seconds ago | + :set noro | silent undo | confirm w | {3:File permissions of "Xconfirm_write_ro" are read-only.} | {3:It may still be possible to write it.} | {3:Do you wish to try?} | |