From 1f403ad2197fc7442409f434ee574f3e6b46fb73 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 13:33:32 +0200 Subject: Adding upstream version 2.14.0+dfsg. Signed-off-by: Daniel Baumann --- tests/snippets/julia/test_strings.txt | 225 ++++++++++++++++++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 tests/snippets/julia/test_strings.txt (limited to 'tests/snippets/julia/test_strings.txt') 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 -- cgit v1.2.3