File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "given" : {
4
+ "foo" : [{"name" : " a" }, {"name" : " b" }],
5
+ "bar" : {"baz" : " qux" }
6
+ },
7
+ "cases" : [
8
+ {
9
+ "expression" : " `foo`" ,
10
+ "result" : " foo"
11
+ },
12
+ {
13
+ "comment" : " Double quotes must be escaped." ,
14
+ "expression" : " `foo\\\" quote`" ,
15
+ "result" : " foo\" quote"
16
+ },
17
+ {
18
+ "expression" : " `✓`" ,
19
+ "result" : " ✓"
20
+ },
21
+ {
22
+ "comment" : " Double quote in literal" ,
23
+ "expression" : " `foo\\\" bar`" ,
24
+ "result" : " foo\" bar"
25
+ },
26
+ {
27
+ "expression" : " `1\\ ``" ,
28
+ "result" : " 1`"
29
+ },
30
+ {
31
+ "comment" : " Multiple literal expressions with escapes" ,
32
+ "expression" : " `\\\\ `.{a:`b`}" ,
33
+ "result" : {"a" : " b" }
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ "comment" : " Literals" ,
39
+ "given" : {"type" : " object" },
40
+ "cases" : [
41
+ {
42
+ "expression" : " `foo`" ,
43
+ "result" : " foo"
44
+ },
45
+ {
46
+ "expression" : " ` foo`" ,
47
+ "result" : " foo"
48
+ },
49
+ {
50
+ "comment" : " Literal on RHS of subexpr not allowed" ,
51
+ "expression" : " foo.`bar`" ,
52
+ "error" : " syntax"
53
+ }
54
+ ]
55
+ }
56
+ ]
You can’t perform that action at this time.
0 commit comments