summaryrefslogtreecommitdiffstats
path: root/tests/snippets/snbt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/snippets/snbt')
-rw-r--r--tests/snippets/snbt/json.txt43
-rw-r--r--tests/snippets/snbt/literals.txt41
-rw-r--r--tests/snippets/snbt/multiline.txt56
-rw-r--r--tests/snippets/snbt/nesting.txt39
-rw-r--r--tests/snippets/snbt/quoted_keys.txt29
5 files changed, 208 insertions, 0 deletions
diff --git a/tests/snippets/snbt/json.txt b/tests/snippets/snbt/json.txt
new file mode 100644
index 0000000..7b02134
--- /dev/null
+++ b/tests/snippets/snbt/json.txt
@@ -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
diff --git a/tests/snippets/snbt/literals.txt b/tests/snippets/snbt/literals.txt
new file mode 100644
index 0000000..cc852b8
--- /dev/null
+++ b/tests/snippets/snbt/literals.txt
@@ -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
diff --git a/tests/snippets/snbt/multiline.txt b/tests/snippets/snbt/multiline.txt
new file mode 100644
index 0000000..35a6a53
--- /dev/null
+++ b/tests/snippets/snbt/multiline.txt
@@ -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
diff --git a/tests/snippets/snbt/nesting.txt b/tests/snippets/snbt/nesting.txt
new file mode 100644
index 0000000..317a9c8
--- /dev/null
+++ b/tests/snippets/snbt/nesting.txt
@@ -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
diff --git a/tests/snippets/snbt/quoted_keys.txt b/tests/snippets/snbt/quoted_keys.txt
new file mode 100644
index 0000000..8e54f5f
--- /dev/null
+++ b/tests/snippets/snbt/quoted_keys.txt
@@ -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