Add more tests for new editor config

This commit is contained in:
Oliver Caldwell 2016-02-01 21:36:24 +00:00
parent a14f8a201e
commit 5474f902dd

View File

@ -1580,6 +1580,8 @@ class TestShellCommand:
({'none_ok': True}, ''),
({}, 'foobar'),
({'placeholder': '{}'}, 'foo {} bar'),
({'placeholder': '{}'}, 'foo{}bar'),
({'placeholder': '{}'}, 'foo "bar {}"')
])
def test_validate_valid(self, klass, kwargs, val):
klass(**kwargs).validate(val)
@ -1587,6 +1589,7 @@ class TestShellCommand:
@pytest.mark.parametrize('kwargs, val', [
({}, ''),
({'placeholder': '{}'}, 'foo bar'),
({'placeholder': '{}'}, 'foo { } bar')
({}, 'foo"'), # not splittable with shlex
])
def test_validate_invalid(self, klass, kwargs, val):