forked from aniani/vim
patch 8.0.0166: JSON with a duplicate key gives an internal error
Problem: JSON with a duplicate key gives an internal error. (Lcd) Solution: Give a normal error. Avoid an error when parsing JSON from a remote client fails.
This commit is contained in:
@@ -148,8 +148,9 @@ func Test_json_decode()
|
||||
|
||||
call assert_fails('call json_decode("\"")', "E474:")
|
||||
call assert_fails('call json_decode("blah")', "E474:")
|
||||
call assert_fails('call json_decode("true blah")', "E474:")
|
||||
call assert_fails('call json_decode("true blah")', "E488:")
|
||||
call assert_fails('call json_decode("<foobar>")', "E474:")
|
||||
call assert_fails('call json_decode("{\"a\":1,\"a\":2}")', "E937:")
|
||||
|
||||
call assert_fails('call json_decode("{")', "E474:")
|
||||
call assert_fails('call json_decode("{foobar}")', "E474:")
|
||||
|
Reference in New Issue
Block a user