summaryrefslogtreecommitdiffstats
path: root/tests/snippets/omg-idl
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/omg-idl
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/omg-idl')
-rw-r--r--tests/snippets/omg-idl/annotation_named_params.txt27
-rw-r--r--tests/snippets/omg-idl/enumerators.txt18
2 files changed, 45 insertions, 0 deletions
diff --git a/tests/snippets/omg-idl/annotation_named_params.txt b/tests/snippets/omg-idl/annotation_named_params.txt
new file mode 100644
index 0000000..2758429
--- /dev/null
+++ b/tests/snippets/omg-idl/annotation_named_params.txt
@@ -0,0 +1,27 @@
+Asserts that annotation named parameters use Name, which is different from the
+normal "scoped_name =" lexing, which uses Name.Constant.
+
+---input---
+@mod::anno(value = const_a) const short const_b = const_a;
+
+---tokens---
+'@mod::anno' Name.Decorator
+'(' Punctuation
+'value' Name
+' ' Text.Whitespace
+'=' Punctuation
+' ' Text.Whitespace
+'const_a' Name
+')' Punctuation
+' ' Text.Whitespace
+'const' Keyword.Declaration
+' ' Text.Whitespace
+'short' Keyword.Type
+' ' Text.Whitespace
+'const_b' Name.Constant
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'const_a' Name
+';' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/snippets/omg-idl/enumerators.txt b/tests/snippets/omg-idl/enumerators.txt
new file mode 100644
index 0000000..e6ff1e3
--- /dev/null
+++ b/tests/snippets/omg-idl/enumerators.txt
@@ -0,0 +1,18 @@
+Asserts that enumerators use Name.Constant instead of just Name.
+
+---input---
+enum Enum_t {enum_a, enum_b};
+
+---tokens---
+'enum' Keyword
+' ' Text.Whitespace
+'Enum_t' Name.Class
+' ' Text.Whitespace
+'{' Punctuation
+'enum_a' Name.Constant
+',' Punctuation
+' ' Text.Whitespace
+'enum_b' Name.Constant
+'}' Punctuation
+';' Punctuation
+'\n' Text.Whitespace