summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-10-01 15:59:35 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-10-01 15:59:35 -0400
commitbc74542becb69980d8009af5272882530b92376c (patch)
tree16a5294564a6cf2d3da87bbca851d20af95bb3f0 /tests
parentaae1c61bab32188be9c47c125604c81db120885f (diff)
downloadcmd2-git-bc74542becb69980d8009af5272882530b92376c.tar.gz
Preserving quotes for do_py input
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cmd2.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 3ce7a11d..a382a940 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -219,10 +219,15 @@ def test_base_py(base_app, capsys):
run_cmd(base_app, 'py qqq=3')
out, err = capsys.readouterr()
assert out == ''
+
run_cmd(base_app, 'py print(qqq)')
out, err = capsys.readouterr()
assert out.rstrip() == '3'
+ run_cmd(base_app, 'py print("spaces" + " in this " + "command")')
+ out, err = capsys.readouterr()
+ assert out.rstrip() == 'spaces in this command'
+
@pytest.mark.skipif(sys.platform == 'win32',
reason="Unit test doesn't work on win32, but feature does")