forked from extern/nushell
Remove old nushell/merge engine-q
This commit is contained in:
5
tests/assets/nu_json/charset_result.hjson
Normal file
5
tests/assets/nu_json/charset_result.hjson
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
ql-ascii: ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
|
||||
js-ascii: ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
|
||||
ml-ascii: ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
|
||||
}
|
5
tests/assets/nu_json/charset_result.json
Normal file
5
tests/assets/nu_json/charset_result.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"ql-ascii": "! \"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",
|
||||
"js-ascii": "! \"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",
|
||||
"ml-ascii": "! \"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
|
||||
}
|
6
tests/assets/nu_json/charset_test.hjson
Normal file
6
tests/assets/nu_json/charset_test.hjson
Normal file
@ -0,0 +1,6 @@
|
||||
ql-ascii: ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
|
||||
js-ascii: "! \"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
|
||||
ml-ascii:
|
||||
'''
|
||||
! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
|
||||
'''
|
26
tests/assets/nu_json/comments_result.hjson
Normal file
26
tests/assets/nu_json/comments_result.hjson
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
foo1: This is a string value. # part of the string
|
||||
foo2: This is a string value.
|
||||
bar1: This is a string value. // part of the string
|
||||
bar2: This is a string value.
|
||||
foobar1: This is a string value./* part of the string */
|
||||
foobar2: This is a string value.
|
||||
rem1: "# test"
|
||||
rem2: "// test"
|
||||
rem3: "/* test */"
|
||||
num1: 0
|
||||
num2: 0
|
||||
num3: 2
|
||||
true1: true
|
||||
true2: true
|
||||
true3: true
|
||||
false1: false
|
||||
false2: false
|
||||
false3: false
|
||||
null1: null
|
||||
null2: null
|
||||
null3: null
|
||||
str1: 00 # part of the string
|
||||
str2: 00.0 // part of the string
|
||||
str3: 02 /* part of the string */
|
||||
}
|
26
tests/assets/nu_json/comments_result.json
Normal file
26
tests/assets/nu_json/comments_result.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"foo1": "This is a string value. # part of the string",
|
||||
"foo2": "This is a string value.",
|
||||
"bar1": "This is a string value. // part of the string",
|
||||
"bar2": "This is a string value.",
|
||||
"foobar1": "This is a string value./* part of the string */",
|
||||
"foobar2": "This is a string value.",
|
||||
"rem1": "# test",
|
||||
"rem2": "// test",
|
||||
"rem3": "/* test */",
|
||||
"num1": 0,
|
||||
"num2": 0,
|
||||
"num3": 2,
|
||||
"true1": true,
|
||||
"true2": true,
|
||||
"true3": true,
|
||||
"false1": false,
|
||||
"false2": false,
|
||||
"false3": false,
|
||||
"null1": null,
|
||||
"null2": null,
|
||||
"null3": null,
|
||||
"str1": "00 # part of the string",
|
||||
"str2": "00.0 // part of the string",
|
||||
"str3": "02 /* part of the string */"
|
||||
}
|
48
tests/assets/nu_json/comments_test.hjson
Normal file
48
tests/assets/nu_json/comments_test.hjson
Normal file
@ -0,0 +1,48 @@
|
||||
// test
|
||||
# all
|
||||
// comment
|
||||
/*
|
||||
styles
|
||||
*/
|
||||
# with lf
|
||||
|
||||
|
||||
|
||||
# !
|
||||
|
||||
{
|
||||
# hjson style comment
|
||||
foo1: This is a string value. # part of the string
|
||||
foo2: "This is a string value." # a comment
|
||||
|
||||
// js style comment
|
||||
bar1: This is a string value. // part of the string
|
||||
bar2: "This is a string value." // a comment
|
||||
|
||||
/* js block style comments */foobar1:/* more */This is a string value./* part of the string */
|
||||
/* js block style comments */foobar2:/* more */"This is a string value."/* a comment */
|
||||
|
||||
rem1: "# test"
|
||||
rem2: "// test"
|
||||
rem3: "/* test */"
|
||||
|
||||
num1: 0 # comment
|
||||
num2: 0.0 // comment
|
||||
num3: 2 /* comment */
|
||||
|
||||
true1: true # comment
|
||||
true2: true // comment
|
||||
true3: true /* comment */
|
||||
|
||||
false1: false # comment
|
||||
false2: false // comment
|
||||
false3: false /* comment */
|
||||
|
||||
null1: null # comment
|
||||
null2: null // comment
|
||||
null3: null /* comment */
|
||||
|
||||
str1: 00 # part of the string
|
||||
str2: 00.0 // part of the string
|
||||
str3: 02 /* part of the string */
|
||||
}
|
3
tests/assets/nu_json/empty_result.hjson
Normal file
3
tests/assets/nu_json/empty_result.hjson
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"": empty
|
||||
}
|
3
tests/assets/nu_json/empty_result.json
Normal file
3
tests/assets/nu_json/empty_result.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"": "empty"
|
||||
}
|
3
tests/assets/nu_json/empty_test.hjson
Normal file
3
tests/assets/nu_json/empty_test.hjson
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"": empty
|
||||
}
|
4
tests/assets/nu_json/failCharset1_test.hjson
Normal file
4
tests/assets/nu_json/failCharset1_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid \u char
|
||||
char: "\uxxxx"
|
||||
}
|
1
tests/assets/nu_json/failJSON02_test.json
Normal file
1
tests/assets/nu_json/failJSON02_test.json
Normal file
@ -0,0 +1 @@
|
||||
["Unclosed array"
|
1
tests/assets/nu_json/failJSON05_test.json
Normal file
1
tests/assets/nu_json/failJSON05_test.json
Normal file
@ -0,0 +1 @@
|
||||
["double extra comma",,]
|
1
tests/assets/nu_json/failJSON06_test.json
Normal file
1
tests/assets/nu_json/failJSON06_test.json
Normal file
@ -0,0 +1 @@
|
||||
[ , "<-- missing value"]
|
1
tests/assets/nu_json/failJSON07_test.json
Normal file
1
tests/assets/nu_json/failJSON07_test.json
Normal file
@ -0,0 +1 @@
|
||||
["Comma after the close"],
|
1
tests/assets/nu_json/failJSON08_test.json
Normal file
1
tests/assets/nu_json/failJSON08_test.json
Normal file
@ -0,0 +1 @@
|
||||
["Extra close"]]
|
1
tests/assets/nu_json/failJSON10_test.json
Normal file
1
tests/assets/nu_json/failJSON10_test.json
Normal file
@ -0,0 +1 @@
|
||||
{"Extra value after close": true} "misplaced quoted value"
|
1
tests/assets/nu_json/failJSON11_test.json
Normal file
1
tests/assets/nu_json/failJSON11_test.json
Normal file
@ -0,0 +1 @@
|
||||
{"Illegal expression": 1 + 2}
|
1
tests/assets/nu_json/failJSON12_test.json
Normal file
1
tests/assets/nu_json/failJSON12_test.json
Normal file
@ -0,0 +1 @@
|
||||
{"Illegal invocation": alert()}
|
1
tests/assets/nu_json/failJSON13_test.json
Normal file
1
tests/assets/nu_json/failJSON13_test.json
Normal file
@ -0,0 +1 @@
|
||||
{"Numbers cannot have leading zeroes": 013}
|
1
tests/assets/nu_json/failJSON14_test.json
Normal file
1
tests/assets/nu_json/failJSON14_test.json
Normal file
@ -0,0 +1 @@
|
||||
{"Numbers cannot be hex": 0x14}
|
1
tests/assets/nu_json/failJSON15_test.json
Normal file
1
tests/assets/nu_json/failJSON15_test.json
Normal file
@ -0,0 +1 @@
|
||||
["Illegal backslash escape: \x15"]
|
1
tests/assets/nu_json/failJSON16_test.json
Normal file
1
tests/assets/nu_json/failJSON16_test.json
Normal file
@ -0,0 +1 @@
|
||||
[\naked]
|
1
tests/assets/nu_json/failJSON17_test.json
Normal file
1
tests/assets/nu_json/failJSON17_test.json
Normal file
@ -0,0 +1 @@
|
||||
["Illegal backslash escape: \017"]
|
1
tests/assets/nu_json/failJSON19_test.json
Normal file
1
tests/assets/nu_json/failJSON19_test.json
Normal file
@ -0,0 +1 @@
|
||||
{"Missing colon" null}
|
1
tests/assets/nu_json/failJSON20_test.json
Normal file
1
tests/assets/nu_json/failJSON20_test.json
Normal file
@ -0,0 +1 @@
|
||||
{"Double colon":: null}
|
1
tests/assets/nu_json/failJSON21_test.json
Normal file
1
tests/assets/nu_json/failJSON21_test.json
Normal file
@ -0,0 +1 @@
|
||||
{"Comma instead of colon", null}
|
1
tests/assets/nu_json/failJSON22_test.json
Normal file
1
tests/assets/nu_json/failJSON22_test.json
Normal file
@ -0,0 +1 @@
|
||||
["Colon instead of comma": false]
|
1
tests/assets/nu_json/failJSON23_test.json
Normal file
1
tests/assets/nu_json/failJSON23_test.json
Normal file
@ -0,0 +1 @@
|
||||
["Bad value", truth]
|
1
tests/assets/nu_json/failJSON24_test.json
Normal file
1
tests/assets/nu_json/failJSON24_test.json
Normal file
@ -0,0 +1 @@
|
||||
['single quote']
|
1
tests/assets/nu_json/failJSON26_test.json
Normal file
1
tests/assets/nu_json/failJSON26_test.json
Normal file
@ -0,0 +1 @@
|
||||
["tab\ character\ in\ string\ "]
|
2
tests/assets/nu_json/failJSON28_test.json
Normal file
2
tests/assets/nu_json/failJSON28_test.json
Normal file
@ -0,0 +1,2 @@
|
||||
["line\
|
||||
break"]
|
1
tests/assets/nu_json/failJSON29_test.json
Normal file
1
tests/assets/nu_json/failJSON29_test.json
Normal file
@ -0,0 +1 @@
|
||||
[0e]
|
1
tests/assets/nu_json/failJSON30_test.json
Normal file
1
tests/assets/nu_json/failJSON30_test.json
Normal file
@ -0,0 +1 @@
|
||||
[0e+]
|
1
tests/assets/nu_json/failJSON31_test.json
Normal file
1
tests/assets/nu_json/failJSON31_test.json
Normal file
@ -0,0 +1 @@
|
||||
[0e+-1]
|
1
tests/assets/nu_json/failJSON32_test.json
Normal file
1
tests/assets/nu_json/failJSON32_test.json
Normal file
@ -0,0 +1 @@
|
||||
{"Comma instead if closing brace": true,
|
1
tests/assets/nu_json/failJSON33_test.json
Normal file
1
tests/assets/nu_json/failJSON33_test.json
Normal file
@ -0,0 +1 @@
|
||||
["mismatch"}
|
2
tests/assets/nu_json/failJSON34_test.json
Normal file
2
tests/assets/nu_json/failJSON34_test.json
Normal file
@ -0,0 +1,2 @@
|
||||
A quoteless string is OK,
|
||||
but two must be contained in an array.
|
4
tests/assets/nu_json/failKey1_test.hjson
Normal file
4
tests/assets/nu_json/failKey1_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid name
|
||||
wrong name: 0
|
||||
}
|
4
tests/assets/nu_json/failKey2_test.hjson
Normal file
4
tests/assets/nu_json/failKey2_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid name
|
||||
{name: 0
|
||||
}
|
4
tests/assets/nu_json/failKey3_test.hjson
Normal file
4
tests/assets/nu_json/failKey3_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid name
|
||||
key,name: 0
|
||||
}
|
4
tests/assets/nu_json/failKey4_test.hjson
Normal file
4
tests/assets/nu_json/failKey4_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid name
|
||||
: 0
|
||||
}
|
3
tests/assets/nu_json/failMLStr1_test.hjson
Normal file
3
tests/assets/nu_json/failMLStr1_test.hjson
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
# invalid multiline string
|
||||
ml: '''
|
6
tests/assets/nu_json/failObj1_test.hjson
Normal file
6
tests/assets/nu_json/failObj1_test.hjson
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
# invalid obj
|
||||
noDelimiter
|
||||
{
|
||||
}
|
||||
}
|
6
tests/assets/nu_json/failObj2_test.hjson
Normal file
6
tests/assets/nu_json/failObj2_test.hjson
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
# invalid obj
|
||||
noEnd
|
||||
{
|
||||
|
||||
}
|
7
tests/assets/nu_json/failObj3_test.hjson
Normal file
7
tests/assets/nu_json/failObj3_test.hjson
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
# missing key
|
||||
|
||||
[
|
||||
test
|
||||
]
|
||||
}
|
4
tests/assets/nu_json/failStr1a_test.hjson
Normal file
4
tests/assets/nu_json/failStr1a_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid quoteless string
|
||||
ql: ]
|
||||
}
|
4
tests/assets/nu_json/failStr1b_test.hjson
Normal file
4
tests/assets/nu_json/failStr1b_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid quoteless string
|
||||
ql: ]x
|
||||
}
|
5
tests/assets/nu_json/failStr1c_test.hjson
Normal file
5
tests/assets/nu_json/failStr1c_test.hjson
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
foo
|
||||
# invalid quoteless string
|
||||
]
|
||||
]
|
5
tests/assets/nu_json/failStr1d_test.hjson
Normal file
5
tests/assets/nu_json/failStr1d_test.hjson
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
foo
|
||||
# invalid quoteless string
|
||||
]x
|
||||
]
|
4
tests/assets/nu_json/failStr2a_test.hjson
Normal file
4
tests/assets/nu_json/failStr2a_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid quoteless string
|
||||
ql: }
|
||||
}
|
4
tests/assets/nu_json/failStr2b_test.hjson
Normal file
4
tests/assets/nu_json/failStr2b_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid quoteless string
|
||||
ql: }x
|
||||
}
|
5
tests/assets/nu_json/failStr2c_test.hjson
Normal file
5
tests/assets/nu_json/failStr2c_test.hjson
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
foo
|
||||
# invalid quoteless string
|
||||
}
|
||||
]
|
5
tests/assets/nu_json/failStr2d_test.hjson
Normal file
5
tests/assets/nu_json/failStr2d_test.hjson
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
foo
|
||||
# invalid quoteless string
|
||||
}x
|
||||
]
|
4
tests/assets/nu_json/failStr3a_test.hjson
Normal file
4
tests/assets/nu_json/failStr3a_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid quoteless string
|
||||
ql: {
|
||||
}
|
4
tests/assets/nu_json/failStr3b_test.hjson
Normal file
4
tests/assets/nu_json/failStr3b_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid quoteless string
|
||||
ql: {x
|
||||
}
|
5
tests/assets/nu_json/failStr3c_test.hjson
Normal file
5
tests/assets/nu_json/failStr3c_test.hjson
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
foo
|
||||
# invalid quoteless string
|
||||
{
|
||||
]
|
5
tests/assets/nu_json/failStr3d_test.hjson
Normal file
5
tests/assets/nu_json/failStr3d_test.hjson
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
foo
|
||||
# invalid quoteless string
|
||||
{x
|
||||
]
|
4
tests/assets/nu_json/failStr4a_test.hjson
Normal file
4
tests/assets/nu_json/failStr4a_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid quoteless string
|
||||
ql: [
|
||||
}
|
4
tests/assets/nu_json/failStr4b_test.hjson
Normal file
4
tests/assets/nu_json/failStr4b_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid quoteless string
|
||||
ql: [x
|
||||
}
|
5
tests/assets/nu_json/failStr4c_test.hjson
Normal file
5
tests/assets/nu_json/failStr4c_test.hjson
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
foo
|
||||
# invalid quoteless string
|
||||
[
|
||||
]
|
5
tests/assets/nu_json/failStr4d_test.hjson
Normal file
5
tests/assets/nu_json/failStr4d_test.hjson
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
foo
|
||||
# invalid quoteless string
|
||||
[x
|
||||
]
|
4
tests/assets/nu_json/failStr5a_test.hjson
Normal file
4
tests/assets/nu_json/failStr5a_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid quoteless string
|
||||
ql: :
|
||||
}
|
4
tests/assets/nu_json/failStr5b_test.hjson
Normal file
4
tests/assets/nu_json/failStr5b_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid quoteless string
|
||||
ql: :x
|
||||
}
|
5
tests/assets/nu_json/failStr5c_test.hjson
Normal file
5
tests/assets/nu_json/failStr5c_test.hjson
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
foo
|
||||
# invalid quoteless string
|
||||
:
|
||||
]
|
5
tests/assets/nu_json/failStr5d_test.hjson
Normal file
5
tests/assets/nu_json/failStr5d_test.hjson
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
foo
|
||||
# invalid quoteless string
|
||||
:x
|
||||
]
|
4
tests/assets/nu_json/failStr6a_test.hjson
Normal file
4
tests/assets/nu_json/failStr6a_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid quoteless string
|
||||
ql: ,
|
||||
}
|
4
tests/assets/nu_json/failStr6b_test.hjson
Normal file
4
tests/assets/nu_json/failStr6b_test.hjson
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# invalid quoteless string
|
||||
ql: ,x
|
||||
}
|
6
tests/assets/nu_json/failStr6c_test.hjson
Normal file
6
tests/assets/nu_json/failStr6c_test.hjson
Normal file
@ -0,0 +1,6 @@
|
||||
[
|
||||
# invalid quoteless string
|
||||
# note that if there were a preceding value the comma would
|
||||
# be allowed/ignored as a separator/trailing comma
|
||||
,
|
||||
]
|
6
tests/assets/nu_json/failStr6d_test.hjson
Normal file
6
tests/assets/nu_json/failStr6d_test.hjson
Normal file
@ -0,0 +1,6 @@
|
||||
[
|
||||
# invalid quoteless string
|
||||
# note that if there were a preceding value the comma would
|
||||
# be allowed/ignored as a separator/trailing comma
|
||||
,x
|
||||
]
|
48
tests/assets/nu_json/kan_result.hjson
Normal file
48
tests/assets/nu_json/kan_result.hjson
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
numbers:
|
||||
[
|
||||
0
|
||||
0
|
||||
0
|
||||
42
|
||||
42.1
|
||||
-5
|
||||
-5.1
|
||||
1701
|
||||
-1701
|
||||
12.345
|
||||
-12.345
|
||||
]
|
||||
native:
|
||||
[
|
||||
true
|
||||
true
|
||||
false
|
||||
false
|
||||
null
|
||||
null
|
||||
]
|
||||
strings:
|
||||
[
|
||||
x 0
|
||||
.0
|
||||
00
|
||||
01
|
||||
0 0 0
|
||||
42 x
|
||||
42.1 asdf
|
||||
1.2.3
|
||||
-5 0 -
|
||||
-5.1 --
|
||||
17.01e2 +
|
||||
-17.01e2 :
|
||||
12345e-3 @
|
||||
-12345e-3 $
|
||||
true true
|
||||
x true
|
||||
false false
|
||||
x false
|
||||
null null
|
||||
x null
|
||||
]
|
||||
}
|
45
tests/assets/nu_json/kan_result.json
Normal file
45
tests/assets/nu_json/kan_result.json
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
"numbers": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
42,
|
||||
42.1,
|
||||
-5,
|
||||
-5.1,
|
||||
1701,
|
||||
-1701,
|
||||
12.345,
|
||||
-12.345
|
||||
],
|
||||
"native": [
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
null,
|
||||
null
|
||||
],
|
||||
"strings": [
|
||||
"x 0",
|
||||
".0",
|
||||
"00",
|
||||
"01",
|
||||
"0 0 0",
|
||||
"42 x",
|
||||
"42.1 asdf",
|
||||
"1.2.3",
|
||||
"-5 0 -",
|
||||
"-5.1 --",
|
||||
"17.01e2 +",
|
||||
"-17.01e2 :",
|
||||
"12345e-3 @",
|
||||
"-12345e-3 $",
|
||||
"true true",
|
||||
"x true",
|
||||
"false false",
|
||||
"x false",
|
||||
"null null",
|
||||
"x null"
|
||||
]
|
||||
}
|
49
tests/assets/nu_json/kan_test.hjson
Normal file
49
tests/assets/nu_json/kan_test.hjson
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
# the comma forces a whitespace check
|
||||
numbers:
|
||||
[
|
||||
0
|
||||
0 ,
|
||||
-0
|
||||
42 ,
|
||||
42.1 ,
|
||||
-5
|
||||
-5.1
|
||||
17.01e2
|
||||
-17.01e2
|
||||
12345e-3 ,
|
||||
-12345e-3 ,
|
||||
]
|
||||
native:
|
||||
[
|
||||
true ,
|
||||
true
|
||||
false ,
|
||||
false
|
||||
null ,
|
||||
null
|
||||
]
|
||||
strings:
|
||||
[
|
||||
x 0
|
||||
.0
|
||||
00
|
||||
01
|
||||
0 0 0
|
||||
42 x
|
||||
42.1 asdf
|
||||
1.2.3
|
||||
-5 0 -
|
||||
-5.1 --
|
||||
17.01e2 +
|
||||
-17.01e2 :
|
||||
12345e-3 @
|
||||
-12345e-3 $
|
||||
true true
|
||||
x true
|
||||
false false
|
||||
x false
|
||||
null null
|
||||
x null
|
||||
]
|
||||
}
|
34
tests/assets/nu_json/keys_result.hjson
Normal file
34
tests/assets/nu_json/keys_result.hjson
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
unquoted_key: test
|
||||
_unquoted: test
|
||||
test-key: test
|
||||
-test: test
|
||||
.key: test
|
||||
trailing: test
|
||||
trailing2: test
|
||||
"#c1": test
|
||||
"foo#bar": test
|
||||
"//bar": test
|
||||
"foo//bar": test
|
||||
"/*foo*/": test
|
||||
"foo/*foo*/bar": test
|
||||
"/*": test
|
||||
"foo/*bar": test
|
||||
"\"": test
|
||||
"foo\"bar": test
|
||||
"'''": test
|
||||
"foo'''bar": test
|
||||
":": test
|
||||
"foo:bar": test
|
||||
"{": test
|
||||
"foo{bar": test
|
||||
"}": test
|
||||
"foo}bar": test
|
||||
"[": test
|
||||
"foo[bar": test
|
||||
"]": test
|
||||
"foo]bar": test
|
||||
nl1: test
|
||||
nl2: test
|
||||
nl3: test
|
||||
}
|
34
tests/assets/nu_json/keys_result.json
Normal file
34
tests/assets/nu_json/keys_result.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"unquoted_key": "test",
|
||||
"_unquoted": "test",
|
||||
"test-key": "test",
|
||||
"-test": "test",
|
||||
".key": "test",
|
||||
"trailing": "test",
|
||||
"trailing2": "test",
|
||||
"#c1": "test",
|
||||
"foo#bar": "test",
|
||||
"//bar": "test",
|
||||
"foo//bar": "test",
|
||||
"/*foo*/": "test",
|
||||
"foo/*foo*/bar": "test",
|
||||
"/*": "test",
|
||||
"foo/*bar": "test",
|
||||
"\"": "test",
|
||||
"foo\"bar": "test",
|
||||
"'''": "test",
|
||||
"foo'''bar": "test",
|
||||
":": "test",
|
||||
"foo:bar": "test",
|
||||
"{": "test",
|
||||
"foo{bar": "test",
|
||||
"}": "test",
|
||||
"foo}bar": "test",
|
||||
"[": "test",
|
||||
"foo[bar": "test",
|
||||
"]": "test",
|
||||
"foo]bar": "test",
|
||||
"nl1": "test",
|
||||
"nl2": "test",
|
||||
"nl3": "test"
|
||||
}
|
48
tests/assets/nu_json/keys_test.hjson
Normal file
48
tests/assets/nu_json/keys_test.hjson
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
# unquoted keys
|
||||
unquoted_key: test
|
||||
_unquoted: test
|
||||
test-key: test
|
||||
-test: test
|
||||
.key: test
|
||||
# trailing spaces in key names are ignored
|
||||
trailing : test
|
||||
trailing2 : test
|
||||
# comment char in key name
|
||||
"#c1": test
|
||||
"foo#bar": test
|
||||
"//bar": test
|
||||
"foo//bar": test
|
||||
"/*foo*/": test
|
||||
"foo/*foo*/bar": test
|
||||
"/*": test
|
||||
"foo/*bar": test
|
||||
# quotes in key name
|
||||
"\"": test
|
||||
"foo\"bar": test
|
||||
"'''": test
|
||||
"foo'''bar": test
|
||||
# control char in key name
|
||||
":": test
|
||||
"foo:bar": test
|
||||
"{": test
|
||||
"foo{bar": test
|
||||
"}": test
|
||||
"foo}bar": test
|
||||
"[": test
|
||||
"foo[bar": test
|
||||
"]": test
|
||||
"foo]bar": test
|
||||
# newline
|
||||
nl1:
|
||||
test
|
||||
nl2
|
||||
:
|
||||
test
|
||||
|
||||
nl3
|
||||
|
||||
:
|
||||
|
||||
test
|
||||
}
|
13
tests/assets/nu_json/oa_result.hjson
Normal file
13
tests/assets/nu_json/oa_result.hjson
Normal file
@ -0,0 +1,13 @@
|
||||
[
|
||||
a
|
||||
{}
|
||||
{}
|
||||
[]
|
||||
[]
|
||||
{
|
||||
b: 1
|
||||
c: []
|
||||
d: {}
|
||||
}
|
||||
[]
|
||||
]
|
13
tests/assets/nu_json/oa_result.json
Normal file
13
tests/assets/nu_json/oa_result.json
Normal file
@ -0,0 +1,13 @@
|
||||
[
|
||||
"a",
|
||||
{},
|
||||
{},
|
||||
[],
|
||||
[],
|
||||
{
|
||||
"b": 1,
|
||||
"c": [],
|
||||
"d": {}
|
||||
},
|
||||
[]
|
||||
]
|
13
tests/assets/nu_json/oa_test.hjson
Normal file
13
tests/assets/nu_json/oa_test.hjson
Normal file
@ -0,0 +1,13 @@
|
||||
[
|
||||
a
|
||||
{}
|
||||
{}
|
||||
[]
|
||||
[]
|
||||
{
|
||||
b: 1
|
||||
c: []
|
||||
d: {}
|
||||
}
|
||||
[]
|
||||
]
|
78
tests/assets/nu_json/pass1_result.hjson
Normal file
78
tests/assets/nu_json/pass1_result.hjson
Normal file
@ -0,0 +1,78 @@
|
||||
[
|
||||
JSON Test Pattern pass1
|
||||
{
|
||||
"object with 1 member":
|
||||
[
|
||||
array with 1 element
|
||||
]
|
||||
}
|
||||
{}
|
||||
[]
|
||||
-42
|
||||
true
|
||||
false
|
||||
null
|
||||
{
|
||||
integer: 1234567890
|
||||
real: -9876.54321
|
||||
e: 1.23456789e-13
|
||||
E: 1.23456789e+34
|
||||
-: 2.3456789012e+76
|
||||
zero: 0
|
||||
one: 1
|
||||
space: " "
|
||||
quote: '''"'''
|
||||
backslash: \
|
||||
controls: "\b\f\n\r\t"
|
||||
slash: / & /
|
||||
alpha: abcdefghijklmnopqrstuvwyz
|
||||
ALPHA: ABCDEFGHIJKLMNOPQRSTUVWYZ
|
||||
digit: 0123456789
|
||||
0123456789: digit
|
||||
special: `1~!@#$%^&*()_+-={':[,]}|;.</>?
|
||||
hex: ģ䕧覫췯ꯍ
|
||||
true: true
|
||||
false: false
|
||||
null: null
|
||||
array: []
|
||||
object: {}
|
||||
address: 50 St. James Street
|
||||
url: http://www.JSON.org/
|
||||
comment: "// /* <!-- --"
|
||||
"# -- --> */": " "
|
||||
" s p a c e d ":
|
||||
[
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
]
|
||||
compact:
|
||||
[
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
]
|
||||
jsontext: '''{"object with 1 member":["array with 1 element"]}'''
|
||||
quotes: " " %22 0x22 034 "
|
||||
"/\\\"쫾몾ꮘﳞ볚\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?": A key can be any string
|
||||
}
|
||||
0.5
|
||||
98.6
|
||||
99.44
|
||||
1066
|
||||
10
|
||||
1
|
||||
0.1
|
||||
1
|
||||
2
|
||||
2
|
||||
rosebud
|
||||
]
|
75
tests/assets/nu_json/pass1_result.json
Normal file
75
tests/assets/nu_json/pass1_result.json
Normal file
@ -0,0 +1,75 @@
|
||||
[
|
||||
"JSON Test Pattern pass1",
|
||||
{
|
||||
"object with 1 member": [
|
||||
"array with 1 element"
|
||||
]
|
||||
},
|
||||
{},
|
||||
[],
|
||||
-42,
|
||||
true,
|
||||
false,
|
||||
null,
|
||||
{
|
||||
"integer": 1234567890,
|
||||
"real": -9876.54321,
|
||||
"e": 1.23456789e-13,
|
||||
"E": 1.23456789e+34,
|
||||
"-": 2.3456789012e+76,
|
||||
"zero": 0,
|
||||
"one": 1,
|
||||
"space": " ",
|
||||
"quote": "\"",
|
||||
"backslash": "\\",
|
||||
"controls": "\b\f\n\r\t",
|
||||
"slash": "/ & /",
|
||||
"alpha": "abcdefghijklmnopqrstuvwyz",
|
||||
"ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ",
|
||||
"digit": "0123456789",
|
||||
"0123456789": "digit",
|
||||
"special": "`1~!@#$%^&*()_+-={':[,]}|;.</>?",
|
||||
"hex": "ģ䕧覫췯ꯍ",
|
||||
"true": true,
|
||||
"false": false,
|
||||
"null": null,
|
||||
"array": [],
|
||||
"object": {},
|
||||
"address": "50 St. James Street",
|
||||
"url": "http://www.JSON.org/",
|
||||
"comment": "// /* <!-- --",
|
||||
"# -- --> */": " ",
|
||||
" s p a c e d ": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7
|
||||
],
|
||||
"compact": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7
|
||||
],
|
||||
"jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}",
|
||||
"quotes": "" \" %22 0x22 034 "",
|
||||
"/\\\"쫾몾ꮘﳞ볚\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?": "A key can be any string"
|
||||
},
|
||||
0.5,
|
||||
98.6,
|
||||
99.44,
|
||||
1066,
|
||||
10,
|
||||
1,
|
||||
0.1,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
"rosebud"
|
||||
]
|
58
tests/assets/nu_json/pass1_test.json
Normal file
58
tests/assets/nu_json/pass1_test.json
Normal file
@ -0,0 +1,58 @@
|
||||
[
|
||||
"JSON Test Pattern pass1",
|
||||
{"object with 1 member":["array with 1 element"]},
|
||||
{},
|
||||
[],
|
||||
-42,
|
||||
true,
|
||||
false,
|
||||
null,
|
||||
{
|
||||
"integer": 1234567890,
|
||||
"real": -9876.543210,
|
||||
"e": 0.123456789e-12,
|
||||
"E": 1.234567890E+34,
|
||||
"-": 23456789012E66,
|
||||
"zero": 0,
|
||||
"one": 1,
|
||||
"space": " ",
|
||||
"quote": "\"",
|
||||
"backslash": "\\",
|
||||
"controls": "\b\f\n\r\t",
|
||||
"slash": "/ & \/",
|
||||
"alpha": "abcdefghijklmnopqrstuvwyz",
|
||||
"ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ",
|
||||
"digit": "0123456789",
|
||||
"0123456789": "digit",
|
||||
"special": "`1~!@#$%^&*()_+-={':[,]}|;.</>?",
|
||||
"hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A",
|
||||
"true": true,
|
||||
"false": false,
|
||||
"null": null,
|
||||
"array":[ ],
|
||||
"object":{ },
|
||||
"address": "50 St. James Street",
|
||||
"url": "http://www.JSON.org/",
|
||||
"comment": "// /* <!-- --",
|
||||
"# -- --> */": " ",
|
||||
" s p a c e d " :[1,2 , 3
|
||||
|
||||
,
|
||||
|
||||
4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7],
|
||||
"jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}",
|
||||
"quotes": "" \u0022 %22 0x22 034 "",
|
||||
"\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?"
|
||||
: "A key can be any string"
|
||||
},
|
||||
0.5 ,98.6
|
||||
,
|
||||
99.44
|
||||
,
|
||||
|
||||
1066,
|
||||
1e1,
|
||||
0.1e1,
|
||||
1e-1,
|
||||
1e00,2e+00,2e-00
|
||||
,"rosebud"]
|
39
tests/assets/nu_json/pass2_result.hjson
Normal file
39
tests/assets/nu_json/pass2_result.hjson
Normal file
@ -0,0 +1,39 @@
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
Not too deep
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
39
tests/assets/nu_json/pass2_result.json
Normal file
39
tests/assets/nu_json/pass2_result.json
Normal file
@ -0,0 +1,39 @@
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
"Not too deep"
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
1
tests/assets/nu_json/pass2_test.json
Normal file
1
tests/assets/nu_json/pass2_test.json
Normal file
@ -0,0 +1 @@
|
||||
[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]]
|
7
tests/assets/nu_json/pass3_result.hjson
Normal file
7
tests/assets/nu_json/pass3_result.hjson
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"JSON Test Pattern pass3":
|
||||
{
|
||||
"The outermost value": must be an object or array.
|
||||
"In this test": It is an object.
|
||||
}
|
||||
}
|
6
tests/assets/nu_json/pass3_result.json
Normal file
6
tests/assets/nu_json/pass3_result.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"JSON Test Pattern pass3": {
|
||||
"The outermost value": "must be an object or array.",
|
||||
"In this test": "It is an object."
|
||||
}
|
||||
}
|
6
tests/assets/nu_json/pass3_test.json
Normal file
6
tests/assets/nu_json/pass3_test.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"JSON Test Pattern pass3": {
|
||||
"The outermost value": "must be an object or array.",
|
||||
"In this test": "It is an object."
|
||||
}
|
||||
}
|
1
tests/assets/nu_json/pass4_result.hjson
Normal file
1
tests/assets/nu_json/pass4_result.hjson
Normal file
@ -0,0 +1 @@
|
||||
10
|
1
tests/assets/nu_json/pass4_result.json
Normal file
1
tests/assets/nu_json/pass4_result.json
Normal file
@ -0,0 +1 @@
|
||||
10
|
2
tests/assets/nu_json/pass4_test.json
Normal file
2
tests/assets/nu_json/pass4_test.json
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
10
|
1
tests/assets/nu_json/passSingle_result.hjson
Normal file
1
tests/assets/nu_json/passSingle_result.hjson
Normal file
@ -0,0 +1 @@
|
||||
allow quoteless strings
|
1
tests/assets/nu_json/passSingle_result.json
Normal file
1
tests/assets/nu_json/passSingle_result.json
Normal file
@ -0,0 +1 @@
|
||||
"allow quoteless strings"
|
1
tests/assets/nu_json/passSingle_test.hjson
Normal file
1
tests/assets/nu_json/passSingle_test.hjson
Normal file
@ -0,0 +1 @@
|
||||
allow quoteless strings
|
7
tests/assets/nu_json/root_result.hjson
Normal file
7
tests/assets/nu_json/root_result.hjson
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
database:
|
||||
{
|
||||
host: 127.0.0.1
|
||||
port: 555
|
||||
}
|
||||
}
|
6
tests/assets/nu_json/root_result.json
Normal file
6
tests/assets/nu_json/root_result.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"database": {
|
||||
"host": "127.0.0.1",
|
||||
"port": 555
|
||||
}
|
||||
}
|
6
tests/assets/nu_json/root_test.hjson
Normal file
6
tests/assets/nu_json/root_test.hjson
Normal file
@ -0,0 +1,6 @@
|
||||
// a object with the root braces omitted
|
||||
database:
|
||||
{
|
||||
host: 127.0.0.1
|
||||
port: 555
|
||||
}
|
49
tests/assets/nu_json/stringify1_result.hjson
Normal file
49
tests/assets/nu_json/stringify1_result.hjson
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
quotes:
|
||||
{
|
||||
num1: "1,2"
|
||||
num2: "-1.1 ,"
|
||||
num3: "1e10 ,2"
|
||||
num4: "-1e-10,"
|
||||
kw1: "true,"
|
||||
kw2: "false ,"
|
||||
kw3: "null,123"
|
||||
close1: "1}"
|
||||
close1b: "1 }"
|
||||
close2: "1]"
|
||||
close2b: "1 ]"
|
||||
close3: "1,"
|
||||
close3b: "1 ,"
|
||||
comment1: "1#str"
|
||||
comment2: "1//str"
|
||||
comment3: "1/*str*/"
|
||||
punc1: "{"
|
||||
punc1b: "{foo"
|
||||
punc2: "}"
|
||||
punc2b: "}foo"
|
||||
punc3: "["
|
||||
punc3b: "[foo"
|
||||
punc4: "]"
|
||||
punc4b: "]foo"
|
||||
punc5: ","
|
||||
punc5b: ",foo"
|
||||
punc6: ":"
|
||||
punc6b: ":foo"
|
||||
}
|
||||
noquotes:
|
||||
{
|
||||
num0: .1,2
|
||||
num1: 1.1.1,2
|
||||
num2: -.1,
|
||||
num3: 1e10e,2
|
||||
num4: -1e--10,
|
||||
kw1: true1,
|
||||
kw2: false0,
|
||||
kw3: null0,
|
||||
close1: a}
|
||||
close2: a]
|
||||
comment1: a#str
|
||||
comment2: a//str
|
||||
comment3: a/*str*/
|
||||
}
|
||||
}
|
47
tests/assets/nu_json/stringify1_result.json
Normal file
47
tests/assets/nu_json/stringify1_result.json
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"quotes": {
|
||||
"num1": "1,2",
|
||||
"num2": "-1.1 ,",
|
||||
"num3": "1e10 ,2",
|
||||
"num4": "-1e-10,",
|
||||
"kw1": "true,",
|
||||
"kw2": "false ,",
|
||||
"kw3": "null,123",
|
||||
"close1": "1}",
|
||||
"close1b": "1 }",
|
||||
"close2": "1]",
|
||||
"close2b": "1 ]",
|
||||
"close3": "1,",
|
||||
"close3b": "1 ,",
|
||||
"comment1": "1#str",
|
||||
"comment2": "1//str",
|
||||
"comment3": "1/*str*/",
|
||||
"punc1": "{",
|
||||
"punc1b": "{foo",
|
||||
"punc2": "}",
|
||||
"punc2b": "}foo",
|
||||
"punc3": "[",
|
||||
"punc3b": "[foo",
|
||||
"punc4": "]",
|
||||
"punc4b": "]foo",
|
||||
"punc5": ",",
|
||||
"punc5b": ",foo",
|
||||
"punc6": ":",
|
||||
"punc6b": ":foo"
|
||||
},
|
||||
"noquotes": {
|
||||
"num0": ".1,2",
|
||||
"num1": "1.1.1,2",
|
||||
"num2": "-.1,",
|
||||
"num3": "1e10e,2",
|
||||
"num4": "-1e--10,",
|
||||
"kw1": "true1,",
|
||||
"kw2": "false0,",
|
||||
"kw3": "null0,",
|
||||
"close1": "a}",
|
||||
"close2": "a]",
|
||||
"comment1": "a#str",
|
||||
"comment2": "a//str",
|
||||
"comment3": "a/*str*/"
|
||||
}
|
||||
}
|
50
tests/assets/nu_json/stringify1_test.hjson
Normal file
50
tests/assets/nu_json/stringify1_test.hjson
Normal file
@ -0,0 +1,50 @@
|
||||
// test if stringify produces correct output
|
||||
{
|
||||
quotes:
|
||||
{
|
||||
num1: "1,2"
|
||||
num2: "-1.1 ,"
|
||||
num3: "1e10 ,2"
|
||||
num4: "-1e-10,"
|
||||
kw1: "true,"
|
||||
kw2: "false ,"
|
||||
kw3: "null,123"
|
||||
close1: "1}"
|
||||
close1b: "1 }"
|
||||
close2: "1]"
|
||||
close2b: "1 ]"
|
||||
close3: "1,"
|
||||
close3b: "1 ,"
|
||||
comment1: "1#str"
|
||||
comment2: "1//str"
|
||||
comment3: "1/*str*/"
|
||||
punc1: "{"
|
||||
punc1b: "{foo"
|
||||
punc2: "}"
|
||||
punc2b: "}foo"
|
||||
punc3: "["
|
||||
punc3b: "[foo"
|
||||
punc4: "]"
|
||||
punc4b: "]foo"
|
||||
punc5: ","
|
||||
punc5b: ",foo"
|
||||
punc6: ":"
|
||||
punc6b: ":foo"
|
||||
}
|
||||
noquotes:
|
||||
{
|
||||
num0: ".1,2"
|
||||
num1: "1.1.1,2"
|
||||
num2: "-.1,"
|
||||
num3: "1e10e,2"
|
||||
num4: "-1e--10,"
|
||||
kw1: "true1,"
|
||||
kw2: "false0,"
|
||||
kw3: "null0,"
|
||||
close1: "a}"
|
||||
close2: "a]"
|
||||
comment1: "a#str"
|
||||
comment2: "a//str"
|
||||
comment3: "a/*str*/"
|
||||
}
|
||||
}
|
75
tests/assets/nu_json/strings_result.hjson
Normal file
75
tests/assets/nu_json/strings_result.hjson
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
text1: This is a valid string value.
|
||||
text2: a \ is just a \
|
||||
text3: "You need quotes\tfor escapes"
|
||||
text4a: " untrimmed "
|
||||
text4b: " untrimmed"
|
||||
text4c: "untrimmed "
|
||||
multiline1:
|
||||
'''
|
||||
first line
|
||||
indented line
|
||||
last line
|
||||
'''
|
||||
multiline2:
|
||||
'''
|
||||
first line
|
||||
indented line
|
||||
last line
|
||||
'''
|
||||
multiline3:
|
||||
'''
|
||||
first line
|
||||
indented line
|
||||
last line
|
||||
|
||||
'''
|
||||
foo1a: asdf\"'a\s\w
|
||||
foo1b: asdf\"'a\s\w
|
||||
foo1c: asdf\"'a\s\w
|
||||
foo2a: '''"asdf"'''
|
||||
foo2b: '''"asdf"'''
|
||||
foo3a: asdf'''
|
||||
foo3b: "'''asdf"
|
||||
foo4a: "asdf'''\nasdf"
|
||||
foo4b: "asdf\n'''asdf"
|
||||
arr:
|
||||
[
|
||||
one
|
||||
two
|
||||
three
|
||||
four
|
||||
]
|
||||
not:
|
||||
{
|
||||
number: 5
|
||||
negative: -4.2
|
||||
yes: true
|
||||
no: false
|
||||
null: null
|
||||
array:
|
||||
[
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
0
|
||||
-1
|
||||
0.5
|
||||
]
|
||||
}
|
||||
special:
|
||||
{
|
||||
true: "true"
|
||||
false: "false"
|
||||
null: "null"
|
||||
one: "1"
|
||||
two: "2"
|
||||
minus: "-3"
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user