Merge branch 'master' of https://github.com/haxwithaxe/qutebrowser into haxwithaxe-master

This commit is contained in:
Florian Bruhin 2016-03-18 06:17:54 +01:00
commit a932183909
2 changed files with 3 additions and 1 deletions

View File

@ -1196,7 +1196,7 @@ class SearchEngineUrl(BaseType):
self._basic_validation(value)
if not value:
return
elif '{}' not in value:
elif not ('{}' in value or '{0}' in value):
raise configexc.ValidationError(value, "must contain \"{}\"")
try:
value.format("")

View File

@ -1726,6 +1726,8 @@ class TestSearchEngineUrl:
@pytest.mark.parametrize('val', [
'http://example.com/?q={}',
'http://example.com/?q={0}',
'http://example.com/?q={0}&a={0}',
'', # empty value with none_ok
])
def test_validate_valid(self, klass, val):