summaryrefslogtreecommitdiff
path: root/tests/snippets/cpp
diff options
context:
space:
mode:
authoramitkummer <49096391+amitkummer@users.noreply.github.com>2021-10-15 08:24:37 +0300
committerGitHub <noreply@github.com>2021-10-15 07:24:37 +0200
commit94aba94f6197ccb15a2dada5486916a0649aa78c (patch)
tree56a54e5d94e43e24a53dbc07bb1294ee2742f8f4 /tests/snippets/cpp
parentbc45f92f6154ce08ab3ea27d7a00de5f56e4225c (diff)
downloadpygments-git-94aba94f6197ccb15a2dada5486916a0649aa78c.tar.gz
Refactor identifiers regex to match unicode characters (#1848)
Diffstat (limited to 'tests/snippets/cpp')
-rw-r--r--tests/snippets/cpp/test_unicode_identifiers.txt146
1 files changed, 146 insertions, 0 deletions
diff --git a/tests/snippets/cpp/test_unicode_identifiers.txt b/tests/snippets/cpp/test_unicode_identifiers.txt
new file mode 100644
index 00000000..fa3d642f
--- /dev/null
+++ b/tests/snippets/cpp/test_unicode_identifiers.txt
@@ -0,0 +1,146 @@
+---input---
+namespace 𝐨𝐩𝐭𝐢𝐨𝐧 {
+ int _hello();
+}
+
+int cześć = 2;
+
+class 𝐨𝐩𝐭𝐢𝐨𝐧𝐬 final {
+ 𝐨𝐩𝐭𝐢𝐨𝐧𝐬() {
+ 爴:
+ int a = 𝐨𝐩𝐭𝐢𝐨𝐧::hello();
+ };
+
+ static 𝐨𝐩𝐭𝐢𝐨𝐧𝐬 𝔡𝔢𝔣𝔞𝔲𝔩𝔱;
+ static 𝐨𝐩𝐭𝐢𝐨𝐧𝐬 𝔢𝔵𝔠𝔢𝔭𝔱𝔦𝔬𝔫𝔰;
+};
+
+enum class ⅭⅤ { red, green = 15, blue };
+
+---tokens---
+'namespace' Keyword
+' ' Text.Whitespace
+'𝐨𝐩𝐭𝐢𝐨𝐧' Name.Namespace
+' ' Text.Whitespace
+'{' Punctuation
+'\n' Text.Whitespace
+
+' ' Text.Whitespace
+'int' Keyword.Type
+' ' Text.Whitespace
+'_hello' Name.Function
+'(' Punctuation
+')' Punctuation
+';' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
+
+'\n' Text.Whitespace
+
+'int' Keyword.Type
+' ' Text.Whitespace
+'cześć' Name
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'2' Literal.Number.Integer
+';' Punctuation
+'\n' Text.Whitespace
+
+'\n' Text.Whitespace
+
+'class' Keyword
+' ' Text
+'𝐨𝐩𝐭𝐢𝐨𝐧𝐬' Name.Class
+' ' Text.Whitespace
+'final' Keyword
+' ' Text.Whitespace
+'{' Punctuation
+'\n' Text.Whitespace
+
+' ' Text.Whitespace
+'𝐨𝐩𝐭𝐢𝐨𝐧𝐬' Name
+'(' Punctuation
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n' Text.Whitespace
+
+' ' Text.Whitespace
+'爴' Name.Label
+':' Punctuation
+'\n' Text.Whitespace
+
+' ' Text.Whitespace
+'int' Keyword.Type
+' ' Text.Whitespace
+'a' Name
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'𝐨𝐩𝐭𝐢𝐨𝐧' Name
+':' Operator
+':' Operator
+'hello' Name
+'(' Punctuation
+')' Punctuation
+';' Punctuation
+'\n' Text.Whitespace
+
+' ' Text.Whitespace
+'}' Punctuation
+';' Punctuation
+'\n' Text.Whitespace
+
+' ' Text.Whitespace
+'\n' Text.Whitespace
+
+' ' Text.Whitespace
+'static' Keyword
+' ' Text.Whitespace
+'𝐨𝐩𝐭𝐢𝐨𝐧𝐬' Name
+' ' Text.Whitespace
+'𝔡𝔢𝔣𝔞𝔲𝔩𝔱' Name
+';' Punctuation
+'\n' Text.Whitespace
+
+' ' Text.Whitespace
+'static' Keyword
+' ' Text.Whitespace
+'𝐨𝐩𝐭𝐢𝐨𝐧𝐬' Name
+' ' Text.Whitespace
+'𝔢𝔵𝔠𝔢𝔭𝔱𝔦𝔬𝔫𝔰' Name
+';' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+';' Punctuation
+'\n' Text.Whitespace
+
+'\n' Text.Whitespace
+
+'enum' Keyword
+' ' Text
+'class' Keyword
+' ' Text.Whitespace
+'ⅭⅤ' Name.Class
+' ' Text.Whitespace
+'{' Punctuation
+' ' Text.Whitespace
+'red' Name
+',' Punctuation
+' ' Text.Whitespace
+'green' Name
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'15' Literal.Number.Integer
+',' Punctuation
+' ' Text.Whitespace
+'blue' Name
+' ' Text.Whitespace
+'}' Punctuation
+';' Punctuation
+'\n' Text.Whitespace