diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-06-07 10:56:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-07 10:56:44 +0200 |
commit | 3abf17ae88e3048c20b1645b9d78b69566e89872 (patch) | |
tree | febd1791bc04f577fd84563bb0eae7512a1b8957 /test/functional/api/vim_spec.lua | |
parent | 5a82afa17aa7dec33af2f9c67e7786e7b5e9e8bb (diff) | |
download | rneovim-3abf17ae88e3048c20b1645b9d78b69566e89872.tar.gz rneovim-3abf17ae88e3048c20b1645b9d78b69566e89872.tar.bz2 rneovim-3abf17ae88e3048c20b1645b9d78b69566e89872.zip |
API: validation: mention invalid method name (#8489)
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 3a686c84e7..e4b343c123 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -20,9 +20,20 @@ local format_string = global_helpers.format_string local intchar2lua = global_helpers.intchar2lua local mergedicts_copy = global_helpers.mergedicts_copy -describe('api', function() +describe('API', function() before_each(clear) + it('validates requests', function() + expect_err('Invalid method: bogus', + request, 'bogus') + expect_err('Invalid method: … の り 。…', + request, '… の り 。…') + expect_err('Invalid method: <empty>', + request, '') + expect_err("can't serialize object", + request, nil) + end) + describe('nvim_command', function() it('works', function() local fname = helpers.tmpname() @@ -924,7 +935,7 @@ describe('api', function() {'i_am_not_a_method', {'xx'}}, {'nvim_set_var', {'avar', 10}}, } - eq({{}, {0, error_types.Exception.id, 'Invalid method name'}}, + eq({{}, {0, error_types.Exception.id, 'Invalid method: i_am_not_a_method'}}, meths.call_atomic(req)) eq(5, meths.get_var('avar')) end) |