summaryrefslogtreecommitdiffstats
path: root/tests/snippets/json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:33:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:33:32 +0000
commit1f403ad2197fc7442409f434ee574f3e6b46fb73 (patch)
tree0299c6dd11d5edfa918a29b6456bc1875f1d288c /tests/snippets/json
parentInitial commit. (diff)
downloadpygments-1f403ad2197fc7442409f434ee574f3e6b46fb73.tar.xz
pygments-1f403ad2197fc7442409f434ee574f3e6b46fb73.zip
Adding upstream version 2.14.0+dfsg.upstream/2.14.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/snippets/json')
-rw-r--r--tests/snippets/json/test_basic.txt30
-rw-r--r--tests/snippets/json/test_basic_bare.txt23
2 files changed, 53 insertions, 0 deletions
diff --git a/tests/snippets/json/test_basic.txt b/tests/snippets/json/test_basic.txt
new file mode 100644
index 0000000..f93b91b
--- /dev/null
+++ b/tests/snippets/json/test_basic.txt
@@ -0,0 +1,30 @@
+---input---
+{"foo": "bar", "foo2": [1, 2, 3], "\u0123": "\u0123"}
+
+---tokens---
+'{' Punctuation
+'"foo"' Name.Tag
+':' Punctuation
+' ' Text.Whitespace
+'"bar"' Literal.String.Double
+',' Punctuation
+' ' Text.Whitespace
+'"foo2"' Name.Tag
+':' Punctuation
+' ' Text.Whitespace
+'[' Punctuation
+'1' Literal.Number.Integer
+',' Punctuation
+' ' Text.Whitespace
+'2' Literal.Number.Integer
+',' Punctuation
+' ' Text.Whitespace
+'3' Literal.Number.Integer
+'],' Punctuation
+' ' Text.Whitespace
+'"\\u0123"' Name.Tag
+':' Punctuation
+' ' Text.Whitespace
+'"\\u0123"' Literal.String.Double
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/snippets/json/test_basic_bare.txt b/tests/snippets/json/test_basic_bare.txt
new file mode 100644
index 0000000..785d264
--- /dev/null
+++ b/tests/snippets/json/test_basic_bare.txt
@@ -0,0 +1,23 @@
+---input---
+"foo": "bar", "foo2": [1, 2, 3]
+
+---tokens---
+'"foo"' Name.Tag
+':' Punctuation
+' ' Text.Whitespace
+'"bar"' Literal.String.Double
+',' Punctuation
+' ' Text.Whitespace
+'"foo2"' Name.Tag
+':' Punctuation
+' ' Text.Whitespace
+'[' Punctuation
+'1' Literal.Number.Integer
+',' Punctuation
+' ' Text.Whitespace
+'2' Literal.Number.Integer
+',' Punctuation
+' ' Text.Whitespace
+'3' Literal.Number.Integer
+']' Punctuation
+'\n' Text.Whitespace