Skip to content

Commit 344d0b2

Browse files
authoredOct 5, 2021
Added even more language tests (#3137)
1 parent 8494519 commit 344d0b2

17 files changed

+299
-3
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
var myObjWithSpecialChars = {
2+
'$special\tchars!': true
3+
normalKey: 'val'
4+
}
5+
6+
----------------------------------------------------
7+
8+
[
9+
["keyword", "var"],
10+
" myObjWithSpecialChars ",
11+
["operator", "="],
12+
["punctuation", "{"],
13+
14+
["property", "'$special\\tchars!'"],
15+
["operator", ":"],
16+
["boolean", "true"],
17+
18+
["property", "normalKey"],
19+
["operator", ":"],
20+
["string", "'val'"],
21+
22+
["punctuation", "}"]
23+
]

‎tests/languages/clojure/string_feature.test

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
"Fo\"obar"
33
"multi-line
44
string"
5+
\NewLine
56

67
----------------------------------------------------
78

89
[
910
["string", "\"\""],
1011
["string", "\"Fo\\\"obar\""],
11-
["string", "\"multi-line\r\nstring\""]
12+
["string", "\"multi-line\r\nstring\""],
13+
["string", "\\NewLine"]
1214
]
1315

1416
----------------------------------------------------
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
assert()
2+
defined()
3+
foreach()
4+
import()
5+
pool()
6+
print()
7+
template()
8+
tool()
9+
toolchain()
10+
11+
----------------------------------------------------
12+
13+
[
14+
["builtin-function", "assert"],
15+
["punctuation", "("],
16+
["punctuation", ")"],
17+
18+
["builtin-function", "defined"],
19+
["punctuation", "("],
20+
["punctuation", ")"],
21+
22+
["builtin-function", "foreach"],
23+
["punctuation", "("],
24+
["punctuation", ")"],
25+
26+
["builtin-function", "import"],
27+
["punctuation", "("],
28+
["punctuation", ")"],
29+
30+
["builtin-function", "pool"],
31+
["punctuation", "("],
32+
["punctuation", ")"],
33+
34+
["builtin-function", "print"],
35+
["punctuation", "("],
36+
["punctuation", ")"],
37+
38+
["builtin-function", "template"],
39+
["punctuation", "("],
40+
["punctuation", ")"],
41+
42+
["builtin-function", "tool"],
43+
["punctuation", "("],
44+
["punctuation", ")"],
45+
46+
["builtin-function", "toolchain"],
47+
["punctuation", "("],
48+
["punctuation", ")"]
49+
]
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
current_cpu
2+
current_os
3+
current_toolchain
4+
default_toolchain
5+
host_cpu
6+
host_os
7+
root_build_dir
8+
root_gen_dir
9+
root_out_dir
10+
target_cpu
11+
target_gen_dir
12+
target_os
13+
target_out_dir
14+
15+
----------------------------------------------------
16+
17+
[
18+
["constant", "current_cpu"],
19+
["constant", "current_os"],
20+
["constant", "current_toolchain"],
21+
["constant", "default_toolchain"],
22+
["constant", "host_cpu"],
23+
["constant", "host_os"],
24+
["constant", "root_build_dir"],
25+
["constant", "root_gen_dir"],
26+
["constant", "root_out_dir"],
27+
["constant", "target_cpu"],
28+
["constant", "target_gen_dir"],
29+
["constant", "target_os"],
30+
["constant", "target_out_dir"]
31+
]
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
if
2+
else
3+
4+
----------------------------------------------------
5+
6+
[
7+
["keyword", "if"],
8+
["keyword", "else"]
9+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FooInput
2+
3+
----------------------------------------------------
4+
5+
[
6+
["atom-input", "FooInput"]
7+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
mutation foo {}
2+
3+
----------------------------------------------------
4+
5+
[
6+
["keyword", "mutation"],
7+
["definition-mutation", "foo"],
8+
["punctuation", "{"],
9+
["punctuation", "}"]
10+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Boolean
2+
Float
3+
ID
4+
Int
5+
String
6+
7+
----------------------------------------------------
8+
9+
[
10+
["scalar", "Boolean"],
11+
["scalar", "Float"],
12+
["scalar", "ID"],
13+
["scalar", "Int"],
14+
["scalar", "String"]
15+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
await
2+
break
3+
catch
4+
continue
5+
do
6+
else
7+
finally
8+
for
9+
if
10+
return
11+
switch
12+
throw
13+
try
14+
while
15+
yield
16+
17+
----------------------------------------------------
18+
19+
[
20+
["keyword", "await"],
21+
["keyword", "break"],
22+
["keyword", "catch"],
23+
["keyword", "continue"],
24+
["keyword", "do"],
25+
["keyword", "else"],
26+
["keyword", "finally"],
27+
["keyword", "for"],
28+
["keyword", "if"],
29+
["keyword", "return"],
30+
["keyword", "switch"],
31+
["keyword", "throw"],
32+
["keyword", "try"],
33+
["keyword", "while"],
34+
["keyword", "yield"]
35+
]

‎tests/languages/javascript!+js-extras/exports_feature.test

+24-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export {d}
1212
export {d,}
1313
export {d as Foo, b as Bar}
1414
export {d as Foo, b as Bar,}
15+
export default function() { }
1516

1617
----------------------------------------------------
1718

@@ -23,6 +24,7 @@ export {d as Foo, b as Bar,}
2324
["keyword", "from"],
2425
["string", "\"mod\""],
2526
["punctuation", ";"],
27+
2628
["keyword", "export"],
2729
["exports", [
2830
["operator", "*"],
@@ -32,6 +34,7 @@ export {d as Foo, b as Bar,}
3234
["keyword", "from"],
3335
["string", "\"mod\""],
3436
["punctuation", ";"],
37+
3538
["keyword", "export"],
3639
["exports", [
3740
["punctuation", "{"],
@@ -40,6 +43,7 @@ export {d as Foo, b as Bar,}
4043
["keyword", "from"],
4144
["string", "\"mod\""],
4245
["punctuation", ";"],
46+
4347
["keyword", "export"],
4448
["exports", [
4549
["punctuation", "{"],
@@ -49,6 +53,7 @@ export {d as Foo, b as Bar,}
4953
["keyword", "from"],
5054
["string", "\"mod\""],
5155
["punctuation", ";"],
56+
5257
["keyword", "export"],
5358
["exports", [
5459
["punctuation", "{"],
@@ -58,6 +63,7 @@ export {d as Foo, b as Bar,}
5863
["keyword", "from"],
5964
["string", "\"mod\""],
6065
["punctuation", ";"],
66+
6167
["keyword", "export"],
6268
["exports", [
6369
["punctuation", "{"],
@@ -68,6 +74,7 @@ export {d as Foo, b as Bar,}
6874
["keyword", "from"],
6975
["string", "\"mod\""],
7076
["punctuation", ";"],
77+
7178
["keyword", "export"],
7279
["exports", [
7380
["punctuation", "{"],
@@ -83,6 +90,7 @@ export {d as Foo, b as Bar,}
8390
["keyword", "from"],
8491
["string", "\"mod\""],
8592
["punctuation", ";"],
93+
8694
["keyword", "export"],
8795
["exports", [
8896
["punctuation", "{"],
@@ -99,30 +107,35 @@ export {d as Foo, b as Bar,}
99107
["keyword", "from"],
100108
["string", "\"mod\""],
101109
["punctuation", ";"],
110+
102111
["keyword", "export"],
103112
["exports", [
104113
["punctuation", "{"],
105114
["punctuation", "}"]
106115
]],
116+
107117
["keyword", "export"],
108118
["exports", [
109119
["punctuation", "{"],
110120
"x",
111121
["punctuation", "}"]
112122
]],
123+
113124
["keyword", "export"],
114125
["exports", [
115126
["punctuation", "{"],
116127
"d",
117128
["punctuation", "}"]
118129
]],
130+
119131
["keyword", "export"],
120132
["exports", [
121133
["punctuation", "{"],
122134
"d",
123135
["punctuation", ","],
124136
["punctuation", "}"]
125137
]],
138+
126139
["keyword", "export"],
127140
["exports", [
128141
["punctuation", "{"],
@@ -135,6 +148,7 @@ export {d as Foo, b as Bar,}
135148
["maybe-class-name", "Bar"],
136149
["punctuation", "}"]
137150
]],
151+
138152
["keyword", "export"],
139153
["exports", [
140154
["punctuation", "{"],
@@ -147,5 +161,13 @@ export {d as Foo, b as Bar,}
147161
["maybe-class-name", "Bar"],
148162
["punctuation", ","],
149163
["punctuation", "}"]
150-
]]
151-
]
164+
]],
165+
166+
["keyword", "export"],
167+
["keyword", "default"],
168+
["keyword", "function"],
169+
["punctuation", "("],
170+
["punctuation", ")"],
171+
["punctuation", "{"],
172+
["punctuation", "}"]
173+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
null
2+
undefined
3+
4+
----------------------------------------------------
5+
6+
[
7+
["keyword", "null"],
8+
["keyword", "undefined"]
9+
]
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
> 1
2+
1
3+
4+
----------------------------------------------------
5+
6+
[
7+
["punctuation", ">"], ["number", "1"],
8+
["output", "1"]
9+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
foo()
2+
3+
----------------------------------------------------
4+
5+
[
6+
["function", "foo"],
7+
["punctuation", "("],
8+
["punctuation", ")"]
9+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
__
2+
x__
3+
4+
----------------------------------------------------
5+
6+
[
7+
["blank", "__"],
8+
["blank", "x__"]
9+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Global`
2+
System`Foo
3+
4+
----------------------------------------------------
5+
6+
[
7+
["context", "Global`"],
8+
["context", "System`Foo"]
9+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Abs
2+
AbsArg
3+
Accuracy
4+
Block
5+
Do
6+
For
7+
Function
8+
If
9+
Manipulate
10+
Module
11+
Nest
12+
NestList
13+
None
14+
Return
15+
Switch
16+
Table
17+
Which
18+
While
19+
20+
----------------------------------------------------
21+
22+
[
23+
["keyword", "Abs"],
24+
["keyword", "AbsArg"],
25+
["keyword", "Accuracy"],
26+
["keyword", "Block"],
27+
["keyword", "Do"],
28+
["keyword", "For"],
29+
["keyword", "Function"],
30+
["keyword", "If"],
31+
["keyword", "Manipulate"],
32+
["keyword", "Module"],
33+
["keyword", "Nest"],
34+
["keyword", "NestList"],
35+
["keyword", "None"],
36+
["keyword", "Return"],
37+
["keyword", "Switch"],
38+
["keyword", "Table"],
39+
["keyword", "Which"],
40+
["keyword", "While"]
41+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FOO
2+
3+
----------------------------------------------------
4+
5+
[
6+
["constant", "FOO"]
7+
]

0 commit comments

Comments
 (0)
Please sign in to comment.