From 9af400f97916851ecd86975118faea2a8c68598f Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 20 Mar 2016 20:03:12 +0300 Subject: eval: Treat [] and [""] as any other empty string --- test/functional/eval/json_functions_spec.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/functional/eval/json_functions_spec.lua b/test/functional/eval/json_functions_spec.lua index 091b6f5457..0b1862fa8b 100644 --- a/test/functional/eval/json_functions_spec.lua +++ b/test/functional/eval/json_functions_spec.lua @@ -507,6 +507,10 @@ describe('json_decode() function', function() it('fails to parse empty string', function() eq('Vim(call):E474: Attempt to decode a blank string', exc_exec('call json_decode("")')) + eq('Vim(call):E474: Attempt to decode a blank string', + exc_exec('call json_decode([])')) + eq('Vim(call):E474: Attempt to decode a blank string', + exc_exec('call json_decode([""])')) eq('Vim(call):E474: Attempt to decode a blank string', exc_exec('call json_decode(" ")')) eq('Vim(call):E474: Attempt to decode a blank string', -- cgit