Skip to content

Commit

Permalink
tests 1
Browse files Browse the repository at this point in the history
  • Loading branch information
trobro committed Oct 14, 2023
1 parent 1c5ccae commit ebfdfc9
Show file tree
Hide file tree
Showing 19 changed files with 241 additions and 1 deletion.
1 change: 1 addition & 0 deletions assets/comments2_result.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
1 change: 1 addition & 0 deletions assets/comments2_result.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
3 changes: 3 additions & 0 deletions assets/comments2_test.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// before
/* before2 */ 3 // after1
// after2
1 change: 1 addition & 0 deletions assets/comments3_result.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a string value // still part of the string
1 change: 1 addition & 0 deletions assets/comments3_result.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"a string value // still part of the string"
3 changes: 3 additions & 0 deletions assets/comments3_test.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// before
/* before2 */ a string value // still part of the string
// after2
23 changes: 23 additions & 0 deletions assets/comments4_result.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
a string value // still part of the string
a string value
{}
{}
{}
[]
{}
{
val5a: 1
val5b: 2
}
[]
[]
[]
[]
[
1
2
]
3
4
]
23 changes: 23 additions & 0 deletions assets/comments4_result.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
"a string value // still part of the string",
"a string value",
{},
{},
{},
[],
{},
{
"val5a": 1,
"val5b": 2
},
[],
[],
[],
[],
[
1,
2
],
3,
4
]
51 changes: 51 additions & 0 deletions assets/comments4_test.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// before
/* before2 */ [ #before1
/*key1keycm*/a string value // still part of the string
/* key2keycm */ "a string value" // not part of the string
// map1before
/* map1key */
{}//map2after
{}
{
// map3 inner comment
}
[]
// map4before
/*map4key*/{
/* map4inner */
} // map4after
//map5before
/*map5key*/ {
//map5ab4
val5a: /* map5akey */ 1, // map5aAfter
val5b: 2 /* map5bb4comma */ , #map5bAfter
#map5extra
} /* map5after */
// vec1bbefore
/* vec1bkey */
[]//vec1bafter
[]
[
// vec3 inner comment
]
// vec4before
/*vec4key*/[
/* vec4inner */
] // vec4after
//vec5before
/*vec5key*/ [
//vec5ab4
1, // vec5aAfter
2 /* vec5bb4comma */ , #vec5bAfter
#vec5extra
] /* map5after */
// before3

3 # after3
# before4
/*before4b*/4/*after4*/
#after4b
]
// after2

/* after3 */
25 changes: 25 additions & 0 deletions assets/comments5_result.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
key1: a string value // still part of the string
key2: a string value
map1: {}
map2: {}
map3: {}
vec1: []
map4: {}
map5:
{
val5a: 1
val5b: 2
}
vec1b: []
vec2: []
vec3: []
vec4: []
vec5:
[
1
2
]
key3: 3
key4: 4
}
23 changes: 23 additions & 0 deletions assets/comments5_result.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"key1": "a string value // still part of the string",
"key2": "a string value",
"map1": {},
"map2": {},
"map3": {},
"vec1": [],
"map4": {},
"map5": {
"val5a": 1,
"val5b": 2
},
"vec1b": [],
"vec2": [],
"vec3": [],
"vec4": [],
"vec5": [
1,
2
],
"key3": 3,
"key4": 4
}
51 changes: 51 additions & 0 deletions assets/comments5_test.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// before
/* before2 */ { #before1
key1:/*key1keycm*/a string value // still part of the string
key2: /* key2keycm */ "a string value" // not part of the string
// map1before
map1: /* map1key */
{}//map2after
map2: {}
map3: {
// map3 inner comment
}
vec1: []
// map4before
map4:/*map4key*/{
/* map4inner */
} // map4after
//map5before
map5: /*map5key*/ {
//map5ab4
val5a: /* map5akey */ 1, // map5aAfter
val5b: 2 /* map5bb4comma */ , #map5bAfter
#map5extra
} /* map5after */
// vec1bbefore
vec1b: /* vec1bkey */
[]//vec1bafter
vec2: []
vec3: [
// vec3 inner comment
]
// vec4before
vec4:/*vec4key*/[
/* vec4inner */
] // vec4after
//vec5before
vec5: /*vec5key*/ [
//vec5ab4
1, // vec5aAfter
2 /* vec5bb4comma */ , #vec5bAfter
#vec5extra
] /* map5after */
// before3

key3 : 3 # after3
# before4
/*before4b*/key4:4/*after4*/
#after4b
}
// after2

/* after3 */
1 change: 1 addition & 0 deletions assets/comments6_result.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
1 change: 1 addition & 0 deletions assets/comments6_result.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
3 changes: 3 additions & 0 deletions assets/comments6_test.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// before
/* before2 */ 3 // after1
// after2
8 changes: 8 additions & 0 deletions assets/comments7_result.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
b:
{
sub1: 3
sub2: 4
}
a: 2
}
7 changes: 7 additions & 0 deletions assets/comments7_result.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"b": {
"sub1": 3,
"sub2": 4
},
"a": 2
}
8 changes: 8 additions & 0 deletions assets/comments7_test.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# comment before
b: /* key comment */ {
sub1: 3 # comment after
sub2: 4 # comment more after
} # cm after obj
// Comment B4
a: 2
/* Last comment */
8 changes: 7 additions & 1 deletion assets/testlist.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
charset_test.hjson
charset2_test.hjson
charset_test.hjson
comments_test.hjson
comments2_test.hjson
comments3_test.hjson
comments4_test.hjson
comments5_test.hjson
comments6_test.hjson
comments7_test.hjson
empty_test.hjson
failCharset1_test.hjson
failJSON02_test.json
Expand Down

0 comments on commit ebfdfc9

Please sign in to comment.