diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:33:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:33:32 +0000 |
commit | 1f403ad2197fc7442409f434ee574f3e6b46fb73 (patch) | |
tree | 0299c6dd11d5edfa918a29b6456bc1875f1d288c /tests/snippets/shell | |
parent | Initial commit. (diff) | |
download | pygments-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/shell')
-rw-r--r-- | tests/snippets/shell/test_array_nums.txt | 14 | ||||
-rw-r--r-- | tests/snippets/shell/test_curly_no_escape_and_quotes.txt | 15 | ||||
-rw-r--r-- | tests/snippets/shell/test_curly_with_escape.txt | 13 | ||||
-rw-r--r-- | tests/snippets/shell/test_end_of_line_nums.txt | 15 | ||||
-rw-r--r-- | tests/snippets/shell/test_parsed_single.txt | 8 | ||||
-rw-r--r-- | tests/snippets/shell/test_short_variable_names.txt | 26 |
6 files changed, 91 insertions, 0 deletions
diff --git a/tests/snippets/shell/test_array_nums.txt b/tests/snippets/shell/test_array_nums.txt new file mode 100644 index 0000000..4e9870c --- /dev/null +++ b/tests/snippets/shell/test_array_nums.txt @@ -0,0 +1,14 @@ +---input--- +a=(1 2 3) + +---tokens--- +'a' Name.Variable +'=' Operator +'(' Operator +'1' Literal.Number +' ' Text.Whitespace +'2' Literal.Number +' ' Text.Whitespace +'3' Literal.Number +')' Operator +'\n' Text.Whitespace diff --git a/tests/snippets/shell/test_curly_no_escape_and_quotes.txt b/tests/snippets/shell/test_curly_no_escape_and_quotes.txt new file mode 100644 index 0000000..9fbb718 --- /dev/null +++ b/tests/snippets/shell/test_curly_no_escape_and_quotes.txt @@ -0,0 +1,15 @@ +---input--- +echo "${a//["b"]/}" + +---tokens--- +'echo' Name.Builtin +' ' Text.Whitespace +'"' Literal.String.Double +'${' Literal.String.Interpol +'a' Name.Variable +'//[' Punctuation +'"b"' Literal.String.Double +']/' Punctuation +'}' Literal.String.Interpol +'"' Literal.String.Double +'\n' Text.Whitespace diff --git a/tests/snippets/shell/test_curly_with_escape.txt b/tests/snippets/shell/test_curly_with_escape.txt new file mode 100644 index 0000000..d03b23e --- /dev/null +++ b/tests/snippets/shell/test_curly_with_escape.txt @@ -0,0 +1,13 @@ +---input--- +echo ${a//[\"]/} + +---tokens--- +'echo' Name.Builtin +' ' Text.Whitespace +'${' Literal.String.Interpol +'a' Name.Variable +'//[' Punctuation +'\\"' Literal.String.Escape +']/' Punctuation +'}' Literal.String.Interpol +'\n' Text.Whitespace diff --git a/tests/snippets/shell/test_end_of_line_nums.txt b/tests/snippets/shell/test_end_of_line_nums.txt new file mode 100644 index 0000000..663ea61 --- /dev/null +++ b/tests/snippets/shell/test_end_of_line_nums.txt @@ -0,0 +1,15 @@ +---input--- +a=1 +b=2 # comment + +---tokens--- +'a' Name.Variable +'=' Operator +'1' Literal.Number +'\n' Text.Whitespace + +'b' Name.Variable +'=' Operator +'2' Literal.Number +' ' Text.Whitespace +'# comment\n' Comment.Single diff --git a/tests/snippets/shell/test_parsed_single.txt b/tests/snippets/shell/test_parsed_single.txt new file mode 100644 index 0000000..3110c8e --- /dev/null +++ b/tests/snippets/shell/test_parsed_single.txt @@ -0,0 +1,8 @@ +---input--- +a=$'abc\'' + +---tokens--- +'a' Name.Variable +'=' Operator +"$'abc\\''" Literal.String.Single +'\n' Text.Whitespace diff --git a/tests/snippets/shell/test_short_variable_names.txt b/tests/snippets/shell/test_short_variable_names.txt new file mode 100644 index 0000000..86d4dc1 --- /dev/null +++ b/tests/snippets/shell/test_short_variable_names.txt @@ -0,0 +1,26 @@ +---input--- +x="$" +y="$_" +z="$abc" + +---tokens--- +'x' Name.Variable +'=' Operator +'"' Literal.String.Double +'$' Text +'"' Literal.String.Double +'\n' Text.Whitespace + +'y' Name.Variable +'=' Operator +'"' Literal.String.Double +'$_' Name.Variable +'"' Literal.String.Double +'\n' Text.Whitespace + +'z' Name.Variable +'=' Operator +'"' Literal.String.Double +'$abc' Name.Variable +'"' Literal.String.Double +'\n' Text.Whitespace |