Add more tests for new editor config
This commit is contained in:
parent
a14f8a201e
commit
5474f902dd
@ -1580,6 +1580,8 @@ class TestShellCommand:
|
|||||||
({'none_ok': True}, ''),
|
({'none_ok': True}, ''),
|
||||||
({}, 'foobar'),
|
({}, 'foobar'),
|
||||||
({'placeholder': '{}'}, 'foo {} bar'),
|
({'placeholder': '{}'}, 'foo {} bar'),
|
||||||
|
({'placeholder': '{}'}, 'foo{}bar'),
|
||||||
|
({'placeholder': '{}'}, 'foo "bar {}"')
|
||||||
])
|
])
|
||||||
def test_validate_valid(self, klass, kwargs, val):
|
def test_validate_valid(self, klass, kwargs, val):
|
||||||
klass(**kwargs).validate(val)
|
klass(**kwargs).validate(val)
|
||||||
@ -1587,6 +1589,7 @@ class TestShellCommand:
|
|||||||
@pytest.mark.parametrize('kwargs, val', [
|
@pytest.mark.parametrize('kwargs, val', [
|
||||||
({}, ''),
|
({}, ''),
|
||||||
({'placeholder': '{}'}, 'foo bar'),
|
({'placeholder': '{}'}, 'foo bar'),
|
||||||
|
({'placeholder': '{}'}, 'foo { } bar')
|
||||||
({}, 'foo"'), # not splittable with shlex
|
({}, 'foo"'), # not splittable with shlex
|
||||||
])
|
])
|
||||||
def test_validate_invalid(self, klass, kwargs, val):
|
def test_validate_invalid(self, klass, kwargs, val):
|
||||||
|
Loading…
Reference in New Issue
Block a user