summaryrefslogtreecommitdiffstats
path: root/tests/snippets/julia/test_strings.txt
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/julia/test_strings.txt
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/julia/test_strings.txt')
-rw-r--r--tests/snippets/julia/test_strings.txt225
1 files changed, 225 insertions, 0 deletions
diff --git a/tests/snippets/julia/test_strings.txt b/tests/snippets/julia/test_strings.txt
new file mode 100644
index 0000000..d5f91bf
--- /dev/null
+++ b/tests/snippets/julia/test_strings.txt
@@ -0,0 +1,225 @@
+# Tests string forms
+
+---input---
+"global function"
+"An $interpolated variable"
+"An $(a + 1) expression"
+"""a"""
+"""
+global function
+de e f
+"inner string"
+"""
+raw"\\ a \" $interp $(1 + 1) \""
+raw"""
+"inner string"
+$interp
+$(1 + 1)
+"""
+# commented "string"
+
+@sprintf "%0.2f" var
+v"1.0"
+var"#nonstandard#"
+
+r"^[abs]+$"m
+arbi"trary"suff
+arbi"trary"1234
+
+`global function`
+`abc \` \$ $interpolated`
+`abc $(a + 1)`
+```a```
+```
+global function
+"thing" ` \$
+`now` $(now())
+```
+# commented `command`
+
+arbi`trary`suff
+arbi`trary`1234
+
+---tokens---
+'"' Literal.String
+'global function' Literal.String
+'"' Literal.String
+'\n' Text.Whitespace
+
+'"' Literal.String
+'An ' Literal.String
+'$interpolated' Literal.String.Interpol
+' variable' Literal.String
+'"' Literal.String
+'\n' Text.Whitespace
+
+'"' Literal.String
+'An ' Literal.String
+'$' Literal.String.Interpol
+'(' Punctuation
+'a' Name
+' ' Text.Whitespace
+'+' Operator
+' ' Text.Whitespace
+'1' Literal.Number.Integer
+')' Punctuation
+' expression' Literal.String
+'"' Literal.String
+'\n' Text.Whitespace
+
+'"""' Literal.String
+'a' Literal.String
+'"""' Literal.String
+'\n' Text.Whitespace
+
+'"""' Literal.String
+'\nglobal function\nde e f\n' Literal.String
+
+'"' Literal.String
+'inner string' Literal.String
+'"' Literal.String
+'\n' Literal.String
+
+'"""' Literal.String
+'\n' Text.Whitespace
+
+'raw' Literal.String.Affix
+'"' Literal.String
+'\\\\ a ' Literal.String
+'\\"' Literal.String.Escape
+' $interp $(1 + 1) ' Literal.String
+'\\"' Literal.String.Escape
+'"' Literal.String
+'\n' Text.Whitespace
+
+'raw' Literal.String.Affix
+'"""' Literal.String
+'\n"inner string"\n$interp\n$(1 + 1)\n' Literal.String
+
+'"""' Literal.String
+'\n' Text.Whitespace
+
+'# commented "string"' Comment
+'\n' Text.Whitespace
+
+'\n' Text.Whitespace
+
+'@sprintf' Name.Decorator
+' ' Text.Whitespace
+'"' Literal.String
+'%0.2f' Literal.String.Interpol
+'"' Literal.String
+' ' Text.Whitespace
+'var' Name
+'\n' Text.Whitespace
+
+'v' Literal.String.Affix
+'"' Literal.String
+'1.0' Literal.String
+'"' Literal.String
+'\n' Text.Whitespace
+
+'var' Literal.String.Affix
+'"' Literal.String
+'#nonstandard#' Literal.String
+'"' Literal.String
+'\n' Text.Whitespace
+
+'\n' Text.Whitespace
+
+'r' Literal.String.Affix
+'"' Literal.String.Regex
+'^[abs]+$' Literal.String.Regex
+'"' Literal.String.Regex
+'m' Literal.String.Affix
+'\n' Text.Whitespace
+
+'arbi' Literal.String.Affix
+'"' Literal.String
+'trary' Literal.String
+'"' Literal.String
+'suff' Literal.String.Affix
+'\n' Text.Whitespace
+
+'arbi' Literal.String.Affix
+'"' Literal.String
+'trary' Literal.String
+'"' Literal.String
+'1234' Literal.String.Affix
+'\n' Text.Whitespace
+
+'\n' Text.Whitespace
+
+'`' Literal.String.Backtick
+'global function' Literal.String.Backtick
+'`' Literal.String.Backtick
+'\n' Text.Whitespace
+
+'`' Literal.String.Backtick
+'abc ' Literal.String.Backtick
+'\\`' Literal.String.Escape
+' ' Literal.String.Backtick
+'\\$' Literal.String.Escape
+' ' Literal.String.Backtick
+'$interpolated' Literal.String.Interpol
+'`' Literal.String.Backtick
+'\n' Text.Whitespace
+
+'`' Literal.String.Backtick
+'abc ' Literal.String.Backtick
+'$' Literal.String.Interpol
+'(' Punctuation
+'a' Name
+' ' Text.Whitespace
+'+' Operator
+' ' Text.Whitespace
+'1' Literal.Number.Integer
+')' Punctuation
+'`' Literal.String.Backtick
+'\n' Text.Whitespace
+
+'```' Literal.String.Backtick
+'a' Literal.String.Backtick
+'```' Literal.String.Backtick
+'\n' Text.Whitespace
+
+'```' Literal.String.Backtick
+'\nglobal function\n"thing" ' Literal.String.Backtick
+'`' Literal.String.Backtick
+' ' Literal.String.Backtick
+'\\$' Literal.String.Escape
+'\n' Literal.String.Backtick
+
+'`' Literal.String.Backtick
+'now' Literal.String.Backtick
+'`' Literal.String.Backtick
+' ' Literal.String.Backtick
+'$' Literal.String.Interpol
+'(' Punctuation
+'now' Name
+'(' Punctuation
+')' Punctuation
+')' Punctuation
+'\n' Literal.String.Backtick
+
+'```' Literal.String.Backtick
+'\n' Text.Whitespace
+
+'# commented `command`' Comment
+'\n' Text.Whitespace
+
+'\n' Text.Whitespace
+
+'arbi' Literal.String.Affix
+'`' Literal.String.Backtick
+'trary' Literal.String.Backtick
+'`' Literal.String.Backtick
+'suff' Literal.String.Affix
+'\n' Text.Whitespace
+
+'arbi' Literal.String.Affix
+'`' Literal.String.Backtick
+'trary' Literal.String.Backtick
+'`' Literal.String.Backtick
+'1234' Literal.String.Affix
+'\n' Text.Whitespace