eval: Treat [] and [""] as any other empty string

This commit is contained in:
ZyX
2016-03-20 20:03:12 +03:00
parent af7ff808c7
commit 9af400f979
2 changed files with 10 additions and 3 deletions

View File

@@ -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',