diff options
author | James McCoy <jamessan@jamessan.com> | 2017-01-06 21:11:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-06 21:11:33 -0500 |
commit | b4c0c61f5caa22962ba94981dece4be8bf8a2c26 (patch) | |
tree | 6cd369e366182d25388377136e04370846573473 /test/functional/eval/msgpack_functions_spec.lua | |
parent | 1fee9a7151b30435947475fb410029397725f2ac (diff) | |
parent | dd48d7b94b8a0f5b4612a3821330d508d5b4241c (diff) | |
download | rneovim-b4c0c61f5caa22962ba94981dece4be8bf8a2c26.tar.gz rneovim-b4c0c61f5caa22962ba94981dece4be8bf8a2c26.tar.bz2 rneovim-b4c0c61f5caa22962ba94981dece4be8bf8a2c26.zip |
Merge pull request #5826 from ZyX-I/fix-typval_encode
Refactor eval/typval_encode.h
Diffstat (limited to 'test/functional/eval/msgpack_functions_spec.lua')
-rw-r--r-- | test/functional/eval/msgpack_functions_spec.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/eval/msgpack_functions_spec.lua b/test/functional/eval/msgpack_functions_spec.lua index 3fb54c2ee7..44c01d2226 100644 --- a/test/functional/eval/msgpack_functions_spec.lua +++ b/test/functional/eval/msgpack_functions_spec.lua @@ -493,6 +493,12 @@ describe('msgpackparse() function', function() exc_exec('call msgpackparse(function("tr"))')) end) + it('fails to parse a partial', function() + execute('function T() dict\nendfunction') + eq('Vim(call):E686: Argument of msgpackparse() must be a List', + exc_exec('call msgpackparse(function("T", [1, 2], {}))')) + end) + it('fails to parse a float', function() eq('Vim(call):E686: Argument of msgpackparse() must be a List', exc_exec('call msgpackparse(0.0)')) @@ -570,6 +576,13 @@ describe('msgpackdump() function', function() exc_exec('call msgpackdump([Todump])')) end) + it('fails to dump a partial', function() + execute('function T() dict\nendfunction') + execute('let Todump = function("T", [1, 2], {})') + eq('Vim(call):E5004: Error while dumping msgpackdump() argument, index 0, itself: attempt to dump function reference', + exc_exec('call msgpackdump([Todump])')) + end) + it('fails to dump a function reference in a list', function() execute('let todump = [function("tr")]') eq('Vim(call):E5004: Error while dumping msgpackdump() argument, index 0, index 0: attempt to dump function reference', @@ -675,6 +688,12 @@ describe('msgpackdump() function', function() exc_exec('call msgpackdump(function("tr"))')) end) + it('fails to dump a partial', function() + execute('function T() dict\nendfunction') + eq('Vim(call):E686: Argument of msgpackdump() must be a List', + exc_exec('call msgpackdump(function("T", [1, 2], {}))')) + end) + it('fails to dump a float', function() eq('Vim(call):E686: Argument of msgpackdump() must be a List', exc_exec('call msgpackdump(0.0)')) |