-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from python-cmd2/multiline_abbreviations
Multiline abbreviations
- Loading branch information
Showing
4 changed files
with
15 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <[email protected]> | ||
|
@@ -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): | ||
|