mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-27 14:47:50 -03:00
Imported test cases from pygments
This commit is contained in:
6
tests/gdscript/test_comment.txt
Normal file
6
tests/gdscript/test_comment.txt
Normal file
@ -0,0 +1,6 @@
|
||||
---input---
|
||||
# Comment
|
||||
|
||||
---tokens---
|
||||
'# Comment' Comment.Single
|
||||
'\n' Text.Whitespace
|
17
tests/gdscript/test_export_array.txt
Normal file
17
tests/gdscript/test_export_array.txt
Normal file
@ -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
|
33
tests/gdscript/test_function_with_types.txt
Normal file
33
tests/gdscript/test_function_with_types.txt
Normal file
@ -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
|
20
tests/gdscript/test_inner_class.txt
Normal file
20
tests/gdscript/test_inner_class.txt
Normal file
@ -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
|
8
tests/gdscript/test_multiline_string.txt
Normal file
8
tests/gdscript/test_multiline_string.txt
Normal file
@ -0,0 +1,8 @@
|
||||
---input---
|
||||
"""
|
||||
Multiline
|
||||
"""
|
||||
|
||||
---tokens---
|
||||
'"""\nMultiline\n"""' Literal.String.Doc
|
||||
'\n' Text.Whitespace
|
15
tests/gdscript/test_signal.txt
Normal file
15
tests/gdscript/test_signal.txt
Normal file
@ -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
|
22
tests/gdscript/test_simple_function.txt
Normal file
22
tests/gdscript/test_simple_function.txt
Normal file
@ -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
|
12
tests/gdscript/test_variable_declaration_and_assigment.txt
Normal file
12
tests/gdscript/test_variable_declaration_and_assigment.txt
Normal file
@ -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
|
Reference in New Issue
Block a user