MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / test_parse_command_only_quoted_args

Function test_parse_command_only_quoted_args

tests/test_parsing.py:787–794  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

785
786
787def test_parse_command_only_quoted_args(parser) -> None:
788 line = 'l "/tmp/directory with spaces/doit.sh"'
789 partial_statement = parser.parse_command_only(line)
790 assert partial_statement.command == "shell"
791 assert partial_statement.args == 'ls -al "/tmp/directory with spaces/doit.sh"'
792 assert partial_statement.raw == line
793 assert not partial_statement.multiline_command
794 assert partial_statement.command_and_args == line.replace("l", "shell ls -al")
795
796
797def test_parse_command_only_unclosed_quote(parser) -> None:

Callers

nothing calls this directly

Calls 1

parse_command_onlyMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…