JS: Add test with trailing comma in JSON object

This commit is contained in:
Asger F
2025-04-28 10:53:17 +02:00
parent 37bcedcf11
commit 6dd8114f00
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
{
"object": {
"foo": 1,
"bar": 2,
}
}

View File

@@ -0,0 +1,15 @@
#10000=@"/object-trailing-comma.json;sourcefile"
files(#10000,"/object-trailing-comma.json")
#10001=@"/;folder"
folders(#10001,"/")
containerparent(#10001,#10000)
#10002=@"loc,{#10000},0,0,0,0"
locations_default(#10002,#10000,0,0,0,0)
hasLocation(#10000,#10002)
#20000=*
json_errors(#20000,"Error: Trailing commas are not allowed in JSON.")
#20001=@"loc,{#10000},5,5,5,5"
locations_default(#20001,#10000,5,5,5,5)
hasLocation(#20000,#20001)
numlines(#10000,6,0,0)
filetype(#10000,"json")