diff options
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 |