From 351b6c9b45366b609c861762e5c27623d486063e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 29 Nov 2018 08:28:35 +0100 Subject: [PATCH] Add unit test for slashes in search terms --- tests/unit/utils/test_urlutils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit/utils/test_urlutils.py b/tests/unit/utils/test_urlutils.py index e77d33783..26b063456 100644 --- a/tests/unit/utils/test_urlutils.py +++ b/tests/unit/utils/test_urlutils.py @@ -97,6 +97,7 @@ def init_config(config_stub): config_stub.val.url.searchengines = { 'test': 'http://www.qutebrowser.org/?q={}', 'test-with-dash': 'http://www.example.org/?q={}', + 'path-search': 'http://www.example.org/{}', 'DEFAULT': 'http://www.example.com/?q={}', } @@ -288,6 +289,7 @@ def test_special_urls(url, special): ('blub testfoo', 'www.example.com', 'q=blub testfoo'), ('stripped ', 'www.example.com', 'q=stripped'), ('test-with-dash testfoo', 'www.example.org', 'q=testfoo'), + ('test/with/slashes', 'www.example.com', 'q=test%2Fwith%2Fslashes'), ]) def test_get_search_url(config_stub, url, host, query, open_base_url): """Test _get_search_url().