18 lines
436 B
Python
18 lines
436 B
Python
import pytest
|
|
|
|
from click.parser import split_arg_string
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
("value", "expect"),
|
|
[
|
|
("cli a b c", ["cli", "a", "b", "c"]),
|
|
("cli 'my file", ["cli", "my file"]),
|
|
("cli 'my file'", ["cli", "my file"]),
|
|
("cli my\\", ["cli", "my"]),
|
|
("cli my\\ file", ["cli", "my file"]),
|
|
],
|
|
)
|
|
def test_split_arg_string(value, expect):
|
|
assert split_arg_string(value) == expect
|