summaryrefslogtreecommitdiff
path: root/tests/snippets/python
diff options
context:
space:
mode:
Diffstat (limited to 'tests/snippets/python')
-rw-r--r--tests/snippets/python/test_bytes_escape_codes.txt24
-rw-r--r--tests/snippets/python/test_string_escape_codes.txt20
2 files changed, 44 insertions, 0 deletions
diff --git a/tests/snippets/python/test_bytes_escape_codes.txt b/tests/snippets/python/test_bytes_escape_codes.txt
new file mode 100644
index 00000000..19948d7e
--- /dev/null
+++ b/tests/snippets/python/test_bytes_escape_codes.txt
@@ -0,0 +1,24 @@
+---input---
+b'\\ \n \x12 \777 \u1234 \U00010348 \N{Plus-Minus Sign}'
+
+---tokens---
+'b' Literal.String.Affix
+"'" Literal.String.Single
+'\\\\' Literal.String.Escape
+' ' Literal.String.Single
+'\\n' Literal.String.Escape
+' ' Literal.String.Single
+'\\x12' Literal.String.Escape
+' ' Literal.String.Single
+'\\777' Literal.String.Escape
+' ' Literal.String.Single
+'\\' Literal.String.Single
+'u1234 ' Literal.String.Single
+'\\' Literal.String.Single
+'U00010348 ' Literal.String.Single
+'\\' Literal.String.Single
+'N' Literal.String.Single
+'{' Literal.String.Single
+'Plus-Minus Sign}' Literal.String.Single
+"'" Literal.String.Single
+'\n' Text
diff --git a/tests/snippets/python/test_string_escape_codes.txt b/tests/snippets/python/test_string_escape_codes.txt
new file mode 100644
index 00000000..5b06329c
--- /dev/null
+++ b/tests/snippets/python/test_string_escape_codes.txt
@@ -0,0 +1,20 @@
+---input---
+'\\ \n \x12 \777 \u1234 \U00010348 \N{Plus-Minus Sign}'
+
+---tokens---
+"'" Literal.String.Single
+'\\\\' Literal.String.Escape
+' ' Literal.String.Single
+'\\n' Literal.String.Escape
+' ' Literal.String.Single
+'\\x12' Literal.String.Escape
+' ' Literal.String.Single
+'\\777' Literal.String.Escape
+' ' Literal.String.Single
+'\\u1234' Literal.String.Escape
+' ' Literal.String.Single
+'\\U00010348' Literal.String.Escape
+' ' Literal.String.Single
+'\\N{Plus-Minus Sign}' Literal.String.Escape
+"'" Literal.String.Single
+'\n' Text