Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added even more language tests #3137

Merged
merged 1 commit into from Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions tests/languages/bicep/property_feature.test
@@ -0,0 +1,23 @@
var myObjWithSpecialChars = {
'$special\tchars!': true
normalKey: 'val'
}

----------------------------------------------------

[
["keyword", "var"],
" myObjWithSpecialChars ",
["operator", "="],
["punctuation", "{"],

["property", "'$special\\tchars!'"],
["operator", ":"],
["boolean", "true"],

["property", "normalKey"],
["operator", ":"],
["string", "'val'"],

["punctuation", "}"]
]
4 changes: 3 additions & 1 deletion tests/languages/clojure/string_feature.test
Expand Up @@ -2,13 +2,15 @@
"Fo\"obar"
"multi-line
string"
\NewLine

----------------------------------------------------

[
["string", "\"\""],
["string", "\"Fo\\\"obar\""],
["string", "\"multi-line\r\nstring\""]
["string", "\"multi-line\r\nstring\""],
["string", "\\NewLine"]
]

----------------------------------------------------
Expand Down
49 changes: 49 additions & 0 deletions tests/languages/gn/builtin-function_feature.test
@@ -0,0 +1,49 @@
assert()
defined()
foreach()
import()
pool()
print()
template()
tool()
toolchain()

----------------------------------------------------

[
["builtin-function", "assert"],
["punctuation", "("],
["punctuation", ")"],

["builtin-function", "defined"],
["punctuation", "("],
["punctuation", ")"],

["builtin-function", "foreach"],
["punctuation", "("],
["punctuation", ")"],

["builtin-function", "import"],
["punctuation", "("],
["punctuation", ")"],

["builtin-function", "pool"],
["punctuation", "("],
["punctuation", ")"],

["builtin-function", "print"],
["punctuation", "("],
["punctuation", ")"],

["builtin-function", "template"],
["punctuation", "("],
["punctuation", ")"],

["builtin-function", "tool"],
["punctuation", "("],
["punctuation", ")"],

["builtin-function", "toolchain"],
["punctuation", "("],
["punctuation", ")"]
]
31 changes: 31 additions & 0 deletions tests/languages/gn/constant_feature.test
@@ -0,0 +1,31 @@
current_cpu
current_os
current_toolchain
default_toolchain
host_cpu
host_os
root_build_dir
root_gen_dir
root_out_dir
target_cpu
target_gen_dir
target_os
target_out_dir

----------------------------------------------------

[
["constant", "current_cpu"],
["constant", "current_os"],
["constant", "current_toolchain"],
["constant", "default_toolchain"],
["constant", "host_cpu"],
["constant", "host_os"],
["constant", "root_build_dir"],
["constant", "root_gen_dir"],
["constant", "root_out_dir"],
["constant", "target_cpu"],
["constant", "target_gen_dir"],
["constant", "target_os"],
["constant", "target_out_dir"]
]
9 changes: 9 additions & 0 deletions tests/languages/gn/keyword_feature.test
@@ -0,0 +1,9 @@
if
else

----------------------------------------------------

[
["keyword", "if"],
["keyword", "else"]
]
7 changes: 7 additions & 0 deletions tests/languages/graphql/atom-input_feature.test
@@ -0,0 +1,7 @@
FooInput

----------------------------------------------------

[
["atom-input", "FooInput"]
]
10 changes: 10 additions & 0 deletions tests/languages/graphql/mutation_feature.test
@@ -0,0 +1,10 @@
mutation foo {}

----------------------------------------------------

[
["keyword", "mutation"],
["definition-mutation", "foo"],
["punctuation", "{"],
["punctuation", "}"]
]
15 changes: 15 additions & 0 deletions tests/languages/graphql/scalar_feature.test
@@ -0,0 +1,15 @@
Boolean
Float
ID
Int
String

----------------------------------------------------

[
["scalar", "Boolean"],
["scalar", "Float"],
["scalar", "ID"],
["scalar", "Int"],
["scalar", "String"]
]
35 changes: 35 additions & 0 deletions tests/languages/javascript!+js-extras/control-flow_feature.test
@@ -0,0 +1,35 @@
await
break
catch
continue
do
else
finally
for
if
return
switch
throw
try
while
yield

----------------------------------------------------

[
["keyword", "await"],
["keyword", "break"],
["keyword", "catch"],
["keyword", "continue"],
["keyword", "do"],
["keyword", "else"],
["keyword", "finally"],
["keyword", "for"],
["keyword", "if"],
["keyword", "return"],
["keyword", "switch"],
["keyword", "throw"],
["keyword", "try"],
["keyword", "while"],
["keyword", "yield"]
]
26 changes: 24 additions & 2 deletions tests/languages/javascript!+js-extras/exports_feature.test
Expand Up @@ -12,6 +12,7 @@ export {d}
export {d,}
export {d as Foo, b as Bar}
export {d as Foo, b as Bar,}
export default function() { }

----------------------------------------------------

Expand All @@ -23,6 +24,7 @@ export {d as Foo, b as Bar,}
["keyword", "from"],
["string", "\"mod\""],
["punctuation", ";"],

["keyword", "export"],
["exports", [
["operator", "*"],
Expand All @@ -32,6 +34,7 @@ export {d as Foo, b as Bar,}
["keyword", "from"],
["string", "\"mod\""],
["punctuation", ";"],

["keyword", "export"],
["exports", [
["punctuation", "{"],
Expand All @@ -40,6 +43,7 @@ export {d as Foo, b as Bar,}
["keyword", "from"],
["string", "\"mod\""],
["punctuation", ";"],

["keyword", "export"],
["exports", [
["punctuation", "{"],
Expand All @@ -49,6 +53,7 @@ export {d as Foo, b as Bar,}
["keyword", "from"],
["string", "\"mod\""],
["punctuation", ";"],

["keyword", "export"],
["exports", [
["punctuation", "{"],
Expand All @@ -58,6 +63,7 @@ export {d as Foo, b as Bar,}
["keyword", "from"],
["string", "\"mod\""],
["punctuation", ";"],

["keyword", "export"],
["exports", [
["punctuation", "{"],
Expand All @@ -68,6 +74,7 @@ export {d as Foo, b as Bar,}
["keyword", "from"],
["string", "\"mod\""],
["punctuation", ";"],

["keyword", "export"],
["exports", [
["punctuation", "{"],
Expand All @@ -83,6 +90,7 @@ export {d as Foo, b as Bar,}
["keyword", "from"],
["string", "\"mod\""],
["punctuation", ";"],

["keyword", "export"],
["exports", [
["punctuation", "{"],
Expand All @@ -99,30 +107,35 @@ export {d as Foo, b as Bar,}
["keyword", "from"],
["string", "\"mod\""],
["punctuation", ";"],

["keyword", "export"],
["exports", [
["punctuation", "{"],
["punctuation", "}"]
]],

["keyword", "export"],
["exports", [
["punctuation", "{"],
"x",
["punctuation", "}"]
]],

["keyword", "export"],
["exports", [
["punctuation", "{"],
"d",
["punctuation", "}"]
]],

["keyword", "export"],
["exports", [
["punctuation", "{"],
"d",
["punctuation", ","],
["punctuation", "}"]
]],

["keyword", "export"],
["exports", [
["punctuation", "{"],
Expand All @@ -135,6 +148,7 @@ export {d as Foo, b as Bar,}
["maybe-class-name", "Bar"],
["punctuation", "}"]
]],

["keyword", "export"],
["exports", [
["punctuation", "{"],
Expand All @@ -147,5 +161,13 @@ export {d as Foo, b as Bar,}
["maybe-class-name", "Bar"],
["punctuation", ","],
["punctuation", "}"]
]]
]
]],

["keyword", "export"],
["keyword", "default"],
["keyword", "function"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"]
]
9 changes: 9 additions & 0 deletions tests/languages/javascript!+js-extras/nil_feature.test
@@ -0,0 +1,9 @@
null
undefined

----------------------------------------------------

[
["keyword", "null"],
["keyword", "undefined"]
]
9 changes: 9 additions & 0 deletions tests/languages/magma/shell_feature.test
@@ -0,0 +1,9 @@
> 1
1

----------------------------------------------------

[
["punctuation", ">"], ["number", "1"],
["output", "1"]
]
9 changes: 9 additions & 0 deletions tests/languages/tremor/function_feature.test
@@ -0,0 +1,9 @@
foo()

----------------------------------------------------

[
["function", "foo"],
["punctuation", "("],
["punctuation", ")"]
]
9 changes: 9 additions & 0 deletions tests/languages/wolfram/black_feature.test
@@ -0,0 +1,9 @@
__
x__

----------------------------------------------------

[
["blank", "__"],
["blank", "x__"]
]
9 changes: 9 additions & 0 deletions tests/languages/wolfram/context_feature.test
@@ -0,0 +1,9 @@
Global`
System`Foo

----------------------------------------------------

[
["context", "Global`"],
["context", "System`Foo"]
]