Skip to content

Commit 1478add

Browse files
authored
Reference tests for patterns starting with special chars (projectfluent#313)
1 parent 7282b86 commit 1478add

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed

test/fixtures/special_chars.ftl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## OK
2+
3+
bracket-inline = [Value]
4+
dot-inline = .Value
5+
star-inline = *Value
6+
7+
## ERRORS
8+
9+
bracket-newline =
10+
[Value]
11+
dot-newline =
12+
.Value
13+
star-newline =
14+
*Value

test/fixtures/special_chars.json

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"type": "Resource",
3+
"body": [
4+
{
5+
"type": "GroupComment",
6+
"content": "OK"
7+
},
8+
{
9+
"type": "Message",
10+
"id": {
11+
"type": "Identifier",
12+
"name": "bracket-inline"
13+
},
14+
"value": {
15+
"type": "Pattern",
16+
"elements": [
17+
{
18+
"type": "TextElement",
19+
"value": "[Value]"
20+
}
21+
]
22+
},
23+
"attributes": [],
24+
"comment": null
25+
},
26+
{
27+
"type": "Message",
28+
"id": {
29+
"type": "Identifier",
30+
"name": "dot-inline"
31+
},
32+
"value": {
33+
"type": "Pattern",
34+
"elements": [
35+
{
36+
"type": "TextElement",
37+
"value": ".Value"
38+
}
39+
]
40+
},
41+
"attributes": [],
42+
"comment": null
43+
},
44+
{
45+
"type": "Message",
46+
"id": {
47+
"type": "Identifier",
48+
"name": "star-inline"
49+
},
50+
"value": {
51+
"type": "Pattern",
52+
"elements": [
53+
{
54+
"type": "TextElement",
55+
"value": "*Value"
56+
}
57+
]
58+
},
59+
"attributes": [],
60+
"comment": null
61+
},
62+
{
63+
"type": "GroupComment",
64+
"content": "ERRORS"
65+
},
66+
{
67+
"type": "Junk",
68+
"annotations": [],
69+
"content": "bracket-newline =\n [Value]\n"
70+
},
71+
{
72+
"type": "Junk",
73+
"annotations": [],
74+
"content": "dot-newline =\n .Value\n"
75+
},
76+
{
77+
"type": "Junk",
78+
"annotations": [],
79+
"content": "star-newline =\n *Value\n"
80+
}
81+
]
82+
}

0 commit comments

Comments
 (0)