JS: Add failing TRAP test for trailing comma

This commit is contained in:
Asger F
2025-04-10 07:19:26 +02:00
parent 0e31bf1e7b
commit 800dd168c2
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
{
"array": [
"foo",
"bar",
]
}

View File

@@ -0,0 +1,15 @@
#10000=@"/array-trailing-comma.json;sourcefile"
files(#10000,"/array-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: Omitted elements are not allowed in JSON.")
#20001=@"loc,{#10000},5,4,5,4"
locations_default(#20001,#10000,5,4,5,4)
hasLocation(#20000,#20001)
numlines(#10000,6,0,0)
filetype(#10000,"json")