mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 14:43:05 -03:00
Reorganize tests into a real spec suite
This commit is contained in:
43
spec/unsupported_lexers/snbt/json.txt
Normal file
43
spec/unsupported_lexers/snbt/json.txt
Normal file
@ -0,0 +1,43 @@
|
||||
---input---
|
||||
{
|
||||
"text": "This is JSON",
|
||||
"extra": [
|
||||
"however",
|
||||
"it's also technically valid SNBT.."
|
||||
]
|
||||
}
|
||||
|
||||
---tokens---
|
||||
'{' Punctuation
|
||||
'\n ' Text.Whitespace
|
||||
'"' Literal.String.Double
|
||||
'text' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'"' Literal.String.Double
|
||||
'This is JSON' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
',' Punctuation
|
||||
'\n ' Text.Whitespace
|
||||
'"' Literal.String.Double
|
||||
'extra' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'[' Punctuation
|
||||
'\n ' Text.Whitespace
|
||||
'"' Literal.String.Double
|
||||
'however' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
',' Punctuation
|
||||
'\n ' Text.Whitespace
|
||||
'"' Literal.String.Double
|
||||
"it's also technically valid SNBT.." Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n ' Text.Whitespace
|
||||
']' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'}' Punctuation
|
||||
'\n' Text
|
41
spec/unsupported_lexers/snbt/literals.txt
Normal file
41
spec/unsupported_lexers/snbt/literals.txt
Normal file
@ -0,0 +1,41 @@
|
||||
---input---
|
||||
{int: 1, byte: 0b, short: 1s, long: 10000L, float: 10.0f, double: 20.0}
|
||||
|
||||
---tokens---
|
||||
'{' Punctuation
|
||||
'int' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'1' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'byte' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'0b' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'short' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'1s' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'long' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'10000L' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'float' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'10.0f' Literal.Number.Float
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'double' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'20.0' Literal.Number.Float
|
||||
'}' Punctuation
|
||||
'\n' Text
|
56
spec/unsupported_lexers/snbt/multiline.txt
Normal file
56
spec/unsupported_lexers/snbt/multiline.txt
Normal file
@ -0,0 +1,56 @@
|
||||
---input---
|
||||
{
|
||||
key: "cool compound",
|
||||
UUID: [I;459130179,987513928,-1425663264,-175461800],
|
||||
list: [
|
||||
0,
|
||||
1,
|
||||
3
|
||||
]
|
||||
}
|
||||
|
||||
---tokens---
|
||||
'{' Punctuation
|
||||
'\n ' Text.Whitespace
|
||||
'key' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'"' Literal.String.Double
|
||||
'cool compound' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
',' Punctuation
|
||||
'\n ' Text.Whitespace
|
||||
'UUID' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'[' Punctuation
|
||||
'I' Name.Attribute
|
||||
';' Punctuation
|
||||
'459130179' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
'987513928' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
'-1425663264' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
'-175461800' Literal.Number.Integer
|
||||
']' Punctuation
|
||||
',' Punctuation
|
||||
'\n ' Text.Whitespace
|
||||
'list' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'[' Punctuation
|
||||
'\n ' Text.Whitespace
|
||||
'0' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
'\n ' Text.Whitespace
|
||||
'1' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
'\n ' Text.Whitespace
|
||||
'3' Literal.Number.Integer
|
||||
'\n ' Text.Whitespace
|
||||
']' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'}' Punctuation
|
||||
'\n' Text
|
39
spec/unsupported_lexers/snbt/nesting.txt
Normal file
39
spec/unsupported_lexers/snbt/nesting.txt
Normal file
@ -0,0 +1,39 @@
|
||||
---input---
|
||||
{root: [{compound: 1b}, {compound: 2b, tag: {key: "value"}}]}
|
||||
|
||||
---tokens---
|
||||
'{' Punctuation
|
||||
'root' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'[' Punctuation
|
||||
'{' Punctuation
|
||||
'compound' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'1b' Literal.Number.Integer
|
||||
'}' Punctuation
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'compound' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'2b' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'tag' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'key' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'"' Literal.String.Double
|
||||
'value' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'}' Punctuation
|
||||
'}' Punctuation
|
||||
']' Punctuation
|
||||
'}' Punctuation
|
||||
'\n' Text
|
29
spec/unsupported_lexers/snbt/quoted_keys.txt
Normal file
29
spec/unsupported_lexers/snbt/quoted_keys.txt
Normal file
@ -0,0 +1,29 @@
|
||||
---input---
|
||||
{"special--key": 10b, normal_key: false, "json..///_type_key": "yup"}
|
||||
|
||||
---tokens---
|
||||
'{' Punctuation
|
||||
'"' Literal.String.Double
|
||||
'special--key' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'10b' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'normal_key' Name.Attribute
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'false' Name.Attribute
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'"' Literal.String.Double
|
||||
'json..///_type_key' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'"' Literal.String.Double
|
||||
'yup' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'}' Punctuation
|
||||
'\n' Text
|
Reference in New Issue
Block a user