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/api/command_spec.lua | |
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/api/command_spec.lua')
-rw-r--r-- | test/functional/api/command_spec.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/api/command_spec.lua b/test/functional/api/command_spec.lua index b7520235b7..e6a9e11fd9 100644 --- a/test/functional/api/command_spec.lua +++ b/test/functional/api/command_spec.lua @@ -5,9 +5,9 @@ local clear = helpers.clear local command = helpers.command local curbufmeths = helpers.curbufmeths local eq = helpers.eq -local expect_err = helpers.expect_err local meths = helpers.meths local source = helpers.source +local pcall_err = helpers.pcall_err describe('nvim_get_commands', function() local cmd_dict = { addr=NIL, bang=false, bar=false, complete=NIL, complete_arg=NIL, count=NIL, definition='echo "Hello World"', name='Hello', nargs='1', range=NIL, register=false, script_id=0, } @@ -19,10 +19,10 @@ describe('nvim_get_commands', function() end) it('validates input', function() - expect_err('builtin=true not implemented', meths.get_commands, - {builtin=true}) - expect_err('unexpected key: foo', meths.get_commands, - {foo='blah'}) + eq('builtin=true not implemented', pcall_err(meths.get_commands, + {builtin=true})) + eq('unexpected key: foo', pcall_err(meths.get_commands, + {foo='blah'})) end) it('gets global user-defined commands', function() |