Exemple #1
0
def test_parse_command_with_double_quoted_argument():
    assert _cmdline_parse_command('a -b "double quoted"') == ['a', '-b', 'double quoted']
Exemple #2
0
def test_parse_command_with_single_quoted_argument():
    assert _cmdline_parse_command("a -b 'single quoted' -c") == ['a', '-b', 'single quoted', '-c']
Exemple #3
0
def test_parse_command_with_flag_only():
    assert _cmdline_parse_command('a -b') == ['a', '-b'], 'Expected command and flag'
Exemple #4
0
def test_parse_command_with_flag_and_argument():
    assert _cmdline_parse_command('a -b c') == ['a', '-b', 'c'], 'Expected command, flag, and argument'
Exemple #5
0
def test_parse_command_only():
    assert _cmdline_parse_command('a') == ['a'], 'Expected command at start of chunk'