Skip to content

Commit 3a1a509

Browse files
committed
Added test cases
1 parent af48d88 commit 3a1a509

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

interpreter/.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

jsone.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,4 +896,4 @@ func render(template interface{}, context map[string]interface{}) (interface{},
896896
Template: v,
897897
}
898898
}
899-
}
899+
}

specification.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,28 +49,28 @@ result: '{"Z":null,"a":{"b":["9",8,{}],"c":45},"q":1,"r":true}'
4949
---
5050
title: $json sorting unicode strings
5151
context: {}
52-
template: {$json: {'\u3347\u0050': 1, '\uE1FF\u0010': 2, '\u0055\u0045': 3}}
53-
result: '{"\\u0055\\u0045": 3, "\\u3347\\u0050": 1 , "\\uE1FF\\u0010": 2}'
52+
template: {$json: {"\u3347\u0050": 1, "\uE1FF\u0010": 2, "\u0055\u0045": 3}}
53+
result: '{"\u0055\u0045": 3, "\u3347\u0050": 1 , "\uE1FF\u0010": 2}'
5454
---
5555
title: $json sorting unicode strings2
5656
context: {}
57-
template: {$json: {'u005A\u10000\u0050': 1, '\u{E1FFF}\u0010': 2, '\u0055a\u0045': 3}}
58-
result: '{"\\u0055a\\u0045": 3, "\\u005A\\u10000\\u0050": 1, "\\u{E1FFF}\\u0010": 2}'
57+
template: {$json: {"u005A\U00010000\u0050": 1, "\U000E1FFF\u0010": 2, "\u0055a\u0045": 3}}
58+
result: '{"\u0055a\u0045": 3, "\u005A\u10000\u0050": 1, "\U000E1FFF\u0010": 2}'
5959
---
6060
title: $json sorting unicode strings3
6161
context: {}
62-
template: {$json: {'e\u{E3FFE}\u732b':'hey', '\u0041\u0012\u107000':'hi', 'A\u{24000}':'hello'}}
63-
result: '{"\\u0041\\u0012\\u107000":"hi", "A\\u{24000}":"hello", "e\\u{E3FFE}\\u732b":"hey"}'
62+
template: {$json: {"e\U000E3FFE\u732b":'hey', "\u0041\u0012\u107000":'hi', "A\U00024000":'hello'}}
63+
result: '{"\u0041\u0012\u107000":"hi", "A\U00024000":"hello", "e\U000E3FFE\u732b":"hey"}'
6464
---
6565
title: $json sorting unicode strings4
6666
context: {}
67-
template: {$json: {'e\u{E3FFE}\u732b':'hey', '\u0041\u{24000}\u107000':'hi', 'A\u4FFF':'hello'}}
68-
result: '{"A\\u4FFF": "hello", "\\u0041\\u{24000}\\u107000": "hi", "e\\u{E3FFE}\\u732b": "hey" }'
67+
template: {$json: {"e\U000E3FFE\u732b":'hey', "\u0041\U00024000\u107000":'hi', "A\u4FFF":'hello'}}
68+
result: '{"A\u4FFF": "hello", "\u0041\U00024000\u107000": "hi", "e\U000E3FFE\\u732b": "hey" }'
6969
---
7070
title: $json sorting unicode string5
7171
context: {}
72-
template: {$json: {'\u{24000}\u732b':'hey', '\u007C\u{24000}\u107000':'hi', '\u0012\u{FFFF4}':'hello'}}
73-
result: '{"A\\u4FFF": "hello", "\\u0041\\u{24000}\\u107000": "hi", "e\\u{E3FFE}\\u732b": "hey" }'
72+
template: {$json: {"\U00024000\u732b":'hey', "\u007C\U00024000\u107000":'hi', "\u0012\U000FFFF4":'hello'}}
73+
result: '{"A\u4FFF": "hello", "\u0041\U00024000\u107000": "hi", "e\U000E3FFE\u732b": "hey" }'
7474
---
7575
title: string interpolation
7676
context: {key: 'world', num: 1}

0 commit comments

Comments
 (0)