diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-06 18:16:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-06 18:16:57 -0700 |
commit | 158b78062e9daa65203b4591dae733dd6c11ad2c (patch) | |
tree | e6988da22f16062b57d50daeda084bcc489a6a1d /test/functional/ex_cmds | |
parent | 638f2b6dee7439de303bea12dec80240617e8034 (diff) | |
parent | 7e1c9598617a140e40a0a22676c0631294617246 (diff) | |
download | rneovim-158b78062e9daa65203b4591dae733dd6c11ad2c.tar.gz rneovim-158b78062e9daa65203b4591dae733dd6c11ad2c.tar.bz2 rneovim-158b78062e9daa65203b4591dae733dd6c11ad2c.zip |
Merge #10932 'test: Eliminate expect_err'
Diffstat (limited to 'test/functional/ex_cmds')
-rw-r--r-- | test/functional/ex_cmds/swapfile_preserve_recover_spec.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua b/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua index 73cbb1d54e..f2a381869e 100644 --- a/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua +++ b/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua @@ -5,7 +5,6 @@ local eq, eval, expect, source = helpers.eq, helpers.eval, helpers.expect, helpers.source local clear = helpers.clear local command = helpers.command -local expect_err = helpers.expect_err local feed = helpers.feed local nvim_prog = helpers.nvim_prog local ok = helpers.ok @@ -14,6 +13,7 @@ local set_session = helpers.set_session local spawn = helpers.spawn local nvim_async = helpers.nvim_async local expect_msg_seq = helpers.expect_msg_seq +local pcall_err = helpers.pcall_err describe(':recover', function() before_each(clear) @@ -21,11 +21,11 @@ describe(':recover', function() it('fails if given a non-existent swapfile', function() local swapname = 'bogus_swapfile' local swapname2 = 'bogus_swapfile.swp' - expect_err('E305: No swap file found for '..swapname, - command, 'recover '..swapname) -- Should not segfault. #2117 + eq('Vim(recover):E305: No swap file found for '..swapname, + pcall_err(command, 'recover '..swapname)) -- Should not segfault. #2117 -- Also check filename ending with ".swp". #9504 - expect_err('Vim%(recover%):E306: Cannot open '..swapname2, - command, 'recover '..swapname2) -- Should not segfault. #2117 + eq('Vim(recover):E306: Cannot open '..swapname2, + pcall_err(command, 'recover '..swapname2)) -- Should not segfault. #2117 eq(2, eval('1+1')) -- Still alive? end) |