From ad09ee3d3bd87c3dddefa890f8dad03bcb4c143c Mon Sep 17 00:00:00 2001 From: kotfu Date: Wed, 8 Aug 2018 20:39:05 -0600 Subject: parse_command_only now appropriately sets multiline_command --- tests/test_parsing.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/test_parsing.py') diff --git a/tests/test_parsing.py b/tests/test_parsing.py index 589b6e7f..de4c637e 100644 --- a/tests/test_parsing.py +++ b/tests/test_parsing.py @@ -601,6 +601,16 @@ def test_parse_command_only_none(parser, line): assert statement.args is None assert statement == '' +def test_parse_command_only_multiline(parser): + line = 'multiline with partially "open quotes and no terminator' + statement = parser.parse_command_only(line) + assert statement.command == 'multiline' + assert statement.multiline_command == 'multiline' + assert statement.args == 'with partially "open quotes and no terminator' + assert statement == statement.args + assert statement.command_and_args == line + + def test_statement_initialization(parser): string = 'alias' statement = cmd2.Statement(string) -- cgit v1.2.1