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/json_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/json_functions_spec.lua')
-rw-r--r-- | test/functional/eval/json_functions_spec.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/eval/json_functions_spec.lua b/test/functional/eval/json_functions_spec.lua index 4a6758019b..fc0a19bdfa 100644 --- a/test/functional/eval/json_functions_spec.lua +++ b/test/functional/eval/json_functions_spec.lua @@ -672,6 +672,12 @@ describe('json_encode() function', function() exc_exec('call json_encode(function("tr"))')) end) + it('fails to dump a partial', function() + execute('function T() dict\nendfunction') + eq('Vim(call):E474: Error while dumping encode_tv2json() argument, itself: attempt to dump function reference', + exc_exec('call json_encode(function("T", [1, 2], {}))')) + end) + it('fails to dump a function reference in a list', function() eq('Vim(call):E474: Error while dumping encode_tv2json() argument, index 0: attempt to dump function reference', exc_exec('call json_encode([function("tr")])')) |