summaryrefslogtreecommitdiff
path: root/tests/test_parsing.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-05-21 16:54:03 -0700
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-05-21 16:54:03 -0700
commita57c664511a42eeeafa530d185f5ff89c6060496 (patch)
tree0d8e7238843a55d5fc35190d317000fcacef50a2 /tests/test_parsing.py
parent64b3a88f2376820ae0af2efeace6d63115fb4891 (diff)
downloadcmd2-git-a57c664511a42eeeafa530d185f5ff89c6060496.tar.gz
Added a unit test and updated changes
Diffstat (limited to 'tests/test_parsing.py')
-rw-r--r--tests/test_parsing.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_parsing.py b/tests/test_parsing.py
index d6b64093..171f33a5 100644
--- a/tests/test_parsing.py
+++ b/tests/test_parsing.py
@@ -2,7 +2,7 @@
"""
Unit/functional testing for helper functions/classes in the cmd2.py module.
-These are primarily tests related to parsing. Moreover, they are mostly a port of the old doctest tests which were
+These are primarily tests related to parsing. Moreover, they are mostly a port of the old doctest tests which were
problematic because they worked properly for some versions of pyparsing but not for others.
Copyright 2017 Todd Leonhardt <todd.leonhardt@gmail.com>
@@ -247,6 +247,12 @@ def test_parse_multiline_ignores_terminators_in_comments(parser):
assert results.terminator[0] == '\n'
assert results.terminator[1] == '\n'
+def test_parse_abbreviated_multiline_not_allowed(parser):
+ line = 'multilin command\n'
+ results = parser.parseString(line)
+ assert results.command == 'multilin'
+ assert results.multilineCommand == ''
+
# Unicode support is only present in cmd2 for Python 3
@pytest.mark.skipif(sys.version_info < (3,0), reason="cmd2 unicode support requires python3")
def test_parse_command_with_unicode_args(parser):