summaryrefslogtreecommitdiffstats
path: root/tests/snippets/usd
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/usd
parentInitial commit. (diff)
downloadpygments-upstream.tar.xz
pygments-upstream.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/usd')
-rw-r--r--tests/snippets/usd/test_attribute.txt174
-rw-r--r--tests/snippets/usd/test_composition_arcs.txt101
-rw-r--r--tests/snippets/usd/test_metadata.txt36
-rw-r--r--tests/snippets/usd/test_numbers.txt21
-rw-r--r--tests/snippets/usd/test_outer_match_at_sign.txt14
-rw-r--r--tests/snippets/usd/test_outer_match_double.txt12
-rw-r--r--tests/snippets/usd/test_outer_match_single.txt12
-rw-r--r--tests/snippets/usd/test_string_multiple_line.txt20
-rw-r--r--tests/snippets/usd/test_string_priority.txt10
-rw-r--r--tests/snippets/usd/test_string_single_line.txt6
10 files changed, 406 insertions, 0 deletions
diff --git a/tests/snippets/usd/test_attribute.txt b/tests/snippets/usd/test_attribute.txt
new file mode 100644
index 0000000..74e6789
--- /dev/null
+++ b/tests/snippets/usd/test_attribute.txt
@@ -0,0 +1,174 @@
+---input---
+double foo = 8.0
+
+custom double foo = 8.0
+
+uniform double foo = 8.0
+
+custom uniform double foo = 8.0
+
+custom double foo_underscore_name = 8.0
+
+double[] foo_underscore_name = [10.1, 12.0, 13]
+
+double[] primvar:foo_thing = [10.1, 12.0, 13]
+
+custom int[] foo = [8, 10, 14]
+
+custom int[] foo.timeSamples = {
+ 1: [8, 0, 14],
+ 2: [-8, 0, 14],
+}
+
+---tokens---
+'double' Keyword.Type
+' ' Text.Whitespace
+'foo' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'8.0' Literal.Number
+'\n\n' Text.Whitespace
+
+'custom' Keyword.Token
+' ' Text.Whitespace
+'double' Keyword.Type
+' ' Text.Whitespace
+'foo' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'8.0' Literal.Number
+'\n\n' Text.Whitespace
+
+'uniform' Keyword.Token
+' ' Text.Whitespace
+'double' Keyword.Type
+' ' Text.Whitespace
+'foo' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'8.0' Literal.Number
+'\n\n' Text.Whitespace
+
+'custom' Keyword.Token
+' ' Text.Whitespace
+'uniform' Keyword.Token
+' ' Text.Whitespace
+'double' Keyword.Type
+' ' Text.Whitespace
+'foo' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'8.0' Literal.Number
+'\n\n' Text.Whitespace
+
+'custom' Keyword.Token
+' ' Text.Whitespace
+'double' Keyword.Type
+' ' Text.Whitespace
+'foo_underscore_name' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'8.0' Literal.Number
+'\n\n' Text.Whitespace
+
+'double[]' Keyword.Type
+' ' Text.Whitespace
+'foo_underscore_name' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'[' Punctuation
+'10.1' Literal.Number
+',' Punctuation
+' ' Text.Whitespace
+'12.0' Literal.Number
+',' Punctuation
+' ' Text.Whitespace
+'13' Literal.Number
+']' Punctuation
+'\n\n' Text.Whitespace
+
+'double[]' Keyword.Type
+' ' Text.Whitespace
+'primvar:foo_thing' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'[' Punctuation
+'10.1' Literal.Number
+',' Punctuation
+' ' Text.Whitespace
+'12.0' Literal.Number
+',' Punctuation
+' ' Text.Whitespace
+'13' Literal.Number
+']' Punctuation
+'\n\n' Text.Whitespace
+
+'custom' Keyword.Token
+' ' Text.Whitespace
+'int[]' Keyword.Type
+' ' Text.Whitespace
+'foo' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'[' Punctuation
+'8' Literal.Number
+',' Punctuation
+' ' Text.Whitespace
+'10' Literal.Number
+',' Punctuation
+' ' Text.Whitespace
+'14' Literal.Number
+']' Punctuation
+'\n\n' Text.Whitespace
+
+'custom' Keyword.Token
+' ' Text.Whitespace
+'int[]' Keyword.Type
+' ' Text.Whitespace
+'foo' Name.Attribute
+'.' Text
+'timeSamples' Name.Keyword.Tokens
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'1' Literal.Number
+':' Punctuation
+' ' Text.Whitespace
+'[' Punctuation
+'8' Literal.Number
+',' Punctuation
+' ' Text.Whitespace
+'0' Literal.Number
+',' Punctuation
+' ' Text.Whitespace
+'14' Literal.Number
+']' Punctuation
+',' Punctuation
+'\n ' Text.Whitespace
+'2' Literal.Number
+':' Punctuation
+' ' Text.Whitespace
+'[' Punctuation
+'-8' Literal.Number
+',' Punctuation
+' ' Text.Whitespace
+'0' Literal.Number
+',' Punctuation
+' ' Text.Whitespace
+'14' Literal.Number
+']' Punctuation
+',' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/snippets/usd/test_composition_arcs.txt b/tests/snippets/usd/test_composition_arcs.txt
new file mode 100644
index 0000000..0270c93
--- /dev/null
+++ b/tests/snippets/usd/test_composition_arcs.txt
@@ -0,0 +1,101 @@
+---input---
+def Xform "BottleMedical" (
+ kind = "prop"
+ payload = @./BottleMedical_payload.usd@</BottleMedical>
+ variants = {
+ string modelingVariant = "LiquidBottleLg"
+ string shadingComplexity = "full"
+ }
+ add variantSets = ["modelingVariant", "shadingComplexity"]
+)
+{
+ variantSet "modelingVariant" = {
+ "ALL_VARIANTS" {
+ }
+ }
+}
+
+---tokens---
+'def' Keyword.Tokens
+' ' Text.Whitespace
+'Xform' Text
+' ' Text.Whitespace
+'"BottleMedical"' Literal.String
+' ' Text.Whitespace
+'(' Punctuation
+'\n ' Text.Whitespace
+'kind' Name.Builtins
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'"prop"' Literal.String
+'\n ' Text.Whitespace
+'payload' Keyword.Tokens
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'@./BottleMedical_payload.usd@' Literal.String.Interpol
+'</BottleMedical>' Name.Namespace
+'\n ' Text.Whitespace
+'variants' Keyword.Tokens
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'string' Keyword.Type
+' ' Text.Whitespace
+'modelingVariant' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'"LiquidBottleLg"' Literal.String
+'\n ' Text.Whitespace
+'string' Keyword.Type
+' ' Text.Whitespace
+'shadingComplexity' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'"full"' Literal.String
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'add' Keyword.Type
+' ' Text.Whitespace
+'variantSets' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'[' Punctuation
+'"modelingVariant"' Literal.String
+',' Punctuation
+' ' Text.Whitespace
+'"shadingComplexity"' Literal.String
+']' Punctuation
+'\n' Text.Whitespace
+
+')' Punctuation
+'\n' Text.Whitespace
+
+'{' Punctuation
+'\n ' Text.Whitespace
+'variantSet' Keyword.Tokens
+' ' Text.Whitespace
+'"modelingVariant"' Literal.String
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'"ALL_VARIANTS"' Literal.String
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/snippets/usd/test_metadata.txt b/tests/snippets/usd/test_metadata.txt
new file mode 100644
index 0000000..edc4614
--- /dev/null
+++ b/tests/snippets/usd/test_metadata.txt
@@ -0,0 +1,36 @@
+# Make sure metadata [the stuff inside ()s] don't match as Attributes.
+
+---input---
+float[] primvars:skel:jointWeights = [1] (
+ elementSize = 1
+ interpolation = "constant"
+)
+
+---tokens---
+'float[]' Keyword.Type
+' ' Text.Whitespace
+'primvars:skel:jointWeights' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'[' Punctuation
+'1' Literal.Number
+']' Punctuation
+' ' Text.Whitespace
+'(' Punctuation
+'\n ' Text.Whitespace
+'elementSize' Name.Builtins
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'1' Literal.Number
+'\n ' Text.Whitespace
+'interpolation' Name.Builtins
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'"constant"' Literal.String
+'\n' Text.Whitespace
+
+')' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/snippets/usd/test_numbers.txt b/tests/snippets/usd/test_numbers.txt
new file mode 100644
index 0000000..a4e0f88
--- /dev/null
+++ b/tests/snippets/usd/test_numbers.txt
@@ -0,0 +1,21 @@
+---input---
+8 8.0123312132, -4 -14.123 1e10 0.1e10 10.123e+10 0.123e-14
+
+---tokens---
+'8' Literal.Number
+' ' Text.Whitespace
+'8.0123312132' Literal.Number
+',' Punctuation
+' ' Text.Whitespace
+'-4' Literal.Number
+' ' Text.Whitespace
+'-14.123' Literal.Number
+' ' Text.Whitespace
+'1e10' Literal.Number
+' ' Text.Whitespace
+'0.1e10' Literal.Number
+' ' Text.Whitespace
+'10.123e+10' Literal.Number
+' ' Text.Whitespace
+'0.123e-14' Literal.Number
+'\n' Text.Whitespace
diff --git a/tests/snippets/usd/test_outer_match_at_sign.txt b/tests/snippets/usd/test_outer_match_at_sign.txt
new file mode 100644
index 0000000..de0bc72
--- /dev/null
+++ b/tests/snippets/usd/test_outer_match_at_sign.txt
@@ -0,0 +1,14 @@
+# Make sure that text between located between quotes and @@s are not matched.
+
+---input---
+@firststring@ something else @secondstring@
+
+---tokens---
+'@firststring@' Literal.String.Interpol
+' ' Text.Whitespace
+'something' Text
+' ' Text.Whitespace
+'else' Text
+' ' Text.Whitespace
+'@secondstring@' Literal.String.Interpol
+'\n' Text.Whitespace
diff --git a/tests/snippets/usd/test_outer_match_double.txt b/tests/snippets/usd/test_outer_match_double.txt
new file mode 100644
index 0000000..773da13
--- /dev/null
+++ b/tests/snippets/usd/test_outer_match_double.txt
@@ -0,0 +1,12 @@
+---input---
+'firststring' something else 'secondstring'
+
+---tokens---
+"'firststring'" Literal.String
+' ' Text.Whitespace
+'something' Text
+' ' Text.Whitespace
+'else' Text
+' ' Text.Whitespace
+"'secondstring'" Literal.String
+'\n' Text.Whitespace
diff --git a/tests/snippets/usd/test_outer_match_single.txt b/tests/snippets/usd/test_outer_match_single.txt
new file mode 100644
index 0000000..773da13
--- /dev/null
+++ b/tests/snippets/usd/test_outer_match_single.txt
@@ -0,0 +1,12 @@
+---input---
+'firststring' something else 'secondstring'
+
+---tokens---
+"'firststring'" Literal.String
+' ' Text.Whitespace
+'something' Text
+' ' Text.Whitespace
+'else' Text
+' ' Text.Whitespace
+"'secondstring'" Literal.String
+'\n' Text.Whitespace
diff --git a/tests/snippets/usd/test_string_multiple_line.txt b/tests/snippets/usd/test_string_multiple_line.txt
new file mode 100644
index 0000000..b3ab1fd
--- /dev/null
+++ b/tests/snippets/usd/test_string_multiple_line.txt
@@ -0,0 +1,20 @@
+---input---
+"""
+Some text multiline
+"""
+
+"""Some text multiline
+"""
+
+"""
+Some text multiline"""
+
+---tokens---
+'"""\nSome text multiline\n"""' Literal.String
+'\n\n' Text.Whitespace
+
+'"""Some text multiline\n"""' Literal.String
+'\n\n' Text.Whitespace
+
+'"""\nSome text multiline"""' Literal.String
+'\n' Text.Whitespace
diff --git a/tests/snippets/usd/test_string_priority.txt b/tests/snippets/usd/test_string_priority.txt
new file mode 100644
index 0000000..481a416
--- /dev/null
+++ b/tests/snippets/usd/test_string_priority.txt
@@ -0,0 +1,10 @@
+# Make sure that no other rules override a string match.
+
+---input---
+"""
+custom int[] foo = [8, 10, 14]
+"""
+
+---tokens---
+'"""\ncustom int[] foo = [8, 10, 14]\n"""' Literal.String
+'\n' Text.Whitespace
diff --git a/tests/snippets/usd/test_string_single_line.txt b/tests/snippets/usd/test_string_single_line.txt
new file mode 100644
index 0000000..b5058ce
--- /dev/null
+++ b/tests/snippets/usd/test_string_single_line.txt
@@ -0,0 +1,6 @@
+---input---
+"Some 'text"
+
+---tokens---
+'"Some \'text"' Literal.String
+'\n' Text.Whitespace