Skip to content

Commit

Permalink
fixup! more test cases for quoted and escaped state
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikVE committed Jun 19, 2020
1 parent 82916fe commit ad7f6c4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/shell/tests/01-run.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@
('\b\b\b\becho', '\"echo\"'),

# test escaping
('echo \\\'', '"echo""\'"'),
('echo \\"', '"echo""""'),
('echo escaped\\ space', '"echo""escaped space"'),
('echo escape within \'\\s\\i\\n\\g\\l\\e\\q\\u\\o\\t\\e\'', '"echo""escape""within""singlequote"'),
('echo escape within "\\d\\o\\u\\b\\l\\e\\q\\u\\o\\t\\e"', '"echo""escape""within""doublequote"'),
("""echo "t\e st" "\\"" '\\'' a\ b""", '"echo""te st"""""\'""a b"'),

# test correct quoting
('echo \\\'', '"echo""\'"'),
('echo \\"', '"echo""""'),
('echo "hello"world', '"echo""helloworld"'),
('echo hel"lowo"rld', '"echo""helloworld"'),
('echo hello"world"', '"echo""helloworld"'),
('echo quoted space " "', '"echo""quoted""space"" "'),
('echo abc"def\'ghijk"lmn', '"echo""abcdef\'ghijklmn"'),
('echo abc\'def"ghijk\'lmn', '"echo""abcdef"ghijklmn"'),
('echo "\'" \'"\'', '"echo""\'""""'),
Expand Down

0 comments on commit ad7f6c4

Please sign in to comment.