summaryrefslogtreecommitdiff
path: root/src/testdir/test_json.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_json.vim')
-rw-r--r--src/testdir/test_json.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/testdir/test_json.vim b/src/testdir/test_json.vim
index 05c394968..52cffc825 100644
--- a/src/testdir/test_json.vim
+++ b/src/testdir/test_json.vim
@@ -75,6 +75,9 @@ func Test_encode()
call assert_fails('echo jsonencode(function("tr"))', 'E474:')
call assert_fails('echo jsonencode([function("tr")])', 'E474:')
call assert_fails('echo jsonencode({"key":v:none})', 'E474:')
+
+ silent! let res = jsonencode(function("tr"))
+ call assert_equal("", res)
endfunc
func Test_decode()