diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-08-23 00:29:24 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-08-23 00:29:24 -0400 |
commit | 6f1eb6860c546631077ed21bdd36b9d665ac79b5 (patch) | |
tree | 9994bd5ff45af8ae9d91d6e7ea9d60e0794bb832 /tests | |
parent | 0ad6b6d5417d0d126dc39550d5416f266cc47ec5 (diff) | |
download | cmd2-git-6f1eb6860c546631077ed21bdd36b9d665ac79b5.tar.gz |
Fixed bug where alias was dropping quotes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cmd2.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index d9ef5e78..13b53224 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -1761,6 +1761,15 @@ def test_alias(base_app, capsys): out = run_cmd(base_app, 'alias fake') assert out == normalize('alias fake pyscript') +def test_alias_with_quotes(base_app, capsys): + # Create the alias + out = run_cmd(base_app, 'alias fake help ">" "out file.txt"') + assert out == normalize("Alias 'fake' created") + + # Lookup the new alias (Only the redirector should be unquoted) + out = run_cmd(base_app, 'alias fake') + assert out == normalize('alias fake help > "out file.txt"') + def test_alias_lookup_invalid_alias(base_app, capsys): # Lookup invalid alias out = run_cmd(base_app, 'alias invalid') |