summaryrefslogtreecommitdiffstats
path: root/tests/snippets/gdscript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/snippets/gdscript')
-rw-r--r--tests/snippets/gdscript/test_comment.txt6
-rw-r--r--tests/snippets/gdscript/test_export_array.txt17
-rw-r--r--tests/snippets/gdscript/test_function_with_types.txt33
-rw-r--r--tests/snippets/gdscript/test_inner_class.txt20
-rw-r--r--tests/snippets/gdscript/test_multiline_string.txt8
-rw-r--r--tests/snippets/gdscript/test_signal.txt15
-rw-r--r--tests/snippets/gdscript/test_simple_function.txt22
-rw-r--r--tests/snippets/gdscript/test_variable_declaration_and_assigment.txt12
8 files changed, 133 insertions, 0 deletions
diff --git a/tests/snippets/gdscript/test_comment.txt b/tests/snippets/gdscript/test_comment.txt
new file mode 100644
index 0000000..ee78bc5
--- /dev/null
+++ b/tests/snippets/gdscript/test_comment.txt
@@ -0,0 +1,6 @@
+---input---
+# Comment
+
+---tokens---
+'# Comment' Comment.Single
+'\n' Text.Whitespace
diff --git a/tests/snippets/gdscript/test_export_array.txt b/tests/snippets/gdscript/test_export_array.txt
new file mode 100644
index 0000000..24a313a
--- /dev/null
+++ b/tests/snippets/gdscript/test_export_array.txt
@@ -0,0 +1,17 @@
+---input---
+export (Array, AudioStream) var streams
+
+---tokens---
+'export' Keyword
+' ' Text.Whitespace
+'(' Punctuation
+'Array' Name.Builtin.Type
+',' Punctuation
+' ' Text.Whitespace
+'AudioStream' Name
+')' Punctuation
+' ' Text.Whitespace
+'var' Keyword
+' ' Text.Whitespace
+'streams' Name
+'\n' Text.Whitespace
diff --git a/tests/snippets/gdscript/test_function_with_types.txt b/tests/snippets/gdscript/test_function_with_types.txt
new file mode 100644
index 0000000..eedf371
--- /dev/null
+++ b/tests/snippets/gdscript/test_function_with_types.txt
@@ -0,0 +1,33 @@
+---input---
+func abc(arg: String) -> void:
+ print("Hello", arg)
+
+---tokens---
+'func' Keyword
+' ' Text.Whitespace
+'abc' Name
+'(' Punctuation
+'arg' Name
+':' Punctuation
+' ' Text.Whitespace
+'String' Name.Builtin.Type
+')' Punctuation
+' ' Text.Whitespace
+'-' Operator
+'>' Operator
+' ' Text.Whitespace
+'void' Name.Builtin.Type
+':' Punctuation
+'\n' Text.Whitespace
+
+'\t' Text.Whitespace
+'print' Name.Builtin
+'(' Punctuation
+'"' Literal.String.Double
+'Hello' Literal.String.Double
+'"' Literal.String.Double
+',' Punctuation
+' ' Text.Whitespace
+'arg' Name
+')' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/snippets/gdscript/test_inner_class.txt b/tests/snippets/gdscript/test_inner_class.txt
new file mode 100644
index 0000000..734242b
--- /dev/null
+++ b/tests/snippets/gdscript/test_inner_class.txt
@@ -0,0 +1,20 @@
+---input---
+class InnerClass:
+ var a = 5
+
+---tokens---
+'class' Keyword
+' ' Text.Whitespace
+'InnerClass' Name
+':' Punctuation
+'\n' Text.Whitespace
+
+'\t' Text.Whitespace
+'var' Keyword
+' ' Text.Whitespace
+'a' Name
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'5' Literal.Number.Integer
+'\n' Text.Whitespace
diff --git a/tests/snippets/gdscript/test_multiline_string.txt b/tests/snippets/gdscript/test_multiline_string.txt
new file mode 100644
index 0000000..b098207
--- /dev/null
+++ b/tests/snippets/gdscript/test_multiline_string.txt
@@ -0,0 +1,8 @@
+---input---
+"""
+Multiline
+"""
+
+---tokens---
+'"""\nMultiline\n"""' Literal.String.Doc
+'\n' Text.Whitespace
diff --git a/tests/snippets/gdscript/test_signal.txt b/tests/snippets/gdscript/test_signal.txt
new file mode 100644
index 0000000..43aa8ec
--- /dev/null
+++ b/tests/snippets/gdscript/test_signal.txt
@@ -0,0 +1,15 @@
+---input---
+signal sig (arg1, arg2)
+
+---tokens---
+'signal' Keyword
+' ' Text.Whitespace
+'sig' Name
+' ' Text.Whitespace
+'(' Punctuation
+'arg1' Name
+',' Punctuation
+' ' Text.Whitespace
+'arg2' Name
+')' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/snippets/gdscript/test_simple_function.txt b/tests/snippets/gdscript/test_simple_function.txt
new file mode 100644
index 0000000..2f444ef
--- /dev/null
+++ b/tests/snippets/gdscript/test_simple_function.txt
@@ -0,0 +1,22 @@
+---input---
+func abc(arg):
+ print("Hello, World!")
+
+---tokens---
+'func' Keyword
+' ' Text.Whitespace
+'abc' Name
+'(' Punctuation
+'arg' Name
+')' Punctuation
+':' Punctuation
+'\n' Text.Whitespace
+
+'\t' Text.Whitespace
+'print' Name.Builtin
+'(' Punctuation
+'"' Literal.String.Double
+'Hello, World!' Literal.String.Double
+'"' Literal.String.Double
+')' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/snippets/gdscript/test_variable_declaration_and_assigment.txt b/tests/snippets/gdscript/test_variable_declaration_and_assigment.txt
new file mode 100644
index 0000000..b2ee890
--- /dev/null
+++ b/tests/snippets/gdscript/test_variable_declaration_and_assigment.txt
@@ -0,0 +1,12 @@
+---input---
+var abc = 5.4
+
+---tokens---
+'var' Keyword
+' ' Text.Whitespace
+'abc' Name
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'5.4' Literal.Number.Float
+'\n' Text.Whitespace