-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
test_literal_spec.json
66 lines (64 loc) · 1.59 KB
/
test_literal_spec.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[
{
"grammar": "R1 = \"1\";",
"entry": "R1",
"tests": [
{
"I": "1",
"O": [{"slice":[0,1],"type":"R1"}]
},
{
"I": "2",
"E": "MatchError: line 1:1, expect R1 (char '1')"
},
{
"I": "",
"E": "MatchError: line 1:1, expect R1 (char '1')"
}
]
},
{
"grammar": "R1 = \"a\";",
"entry": "R1",
"tests": [
{
"I": "a",
"O": [{"slice":[0,1],"type":"R1"}]
},
{
"I": "b",
"E": "MatchError: line 1:1, expect R1 (char 'a')"
},
{
"I": "",
"E": "MatchError: line 1:1, expect R1 (char 'a')"
}
]
},
{
"grammar": "R1 = \"Hello World\";",
"entry": "R1",
"tests": [
{
"I": "Hello World",
"O": [{"slice":[0,11],"type":"R1"}]
},
{
"I": "Hello Worl",
"E": "MatchError: line 1:1, expect R1 (len 11)"
},
{
"I": "hello world",
"E": "MatchError: line 1:1, expect R1 (char 'H')"
},
{
"I": "Hello World + More Text",
"O": [{"slice":[0,11],"type":"R1"}]
},
{
"I": "",
"E": "MatchError: line 1:1, expect R1 (char 'H')"
}
]
}
]