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 9efd64e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/shell/tests/01-run.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,17 @@
('\b\b\b\becho', '\"echo\"'),

# test escaping
('echo \\\'', '"echo""\'"'),
('echo \\"', '"echo""""'),
('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 9efd64e

Please sign in to comment.