summaryrefslogtreecommitdiff
path: root/tests/unit/completion/test_listcategory.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/completion/test_listcategory.py')
-rw-r--r--tests/unit/completion/test_listcategory.py22
1 files changed, 7 insertions, 15 deletions
diff --git a/tests/unit/completion/test_listcategory.py b/tests/unit/completion/test_listcategory.py
index 39ccfa0b9..80bcb5c39 100644
--- a/tests/unit/completion/test_listcategory.py
+++ b/tests/unit/completion/test_listcategory.py
@@ -1,19 +1,6 @@
-# Copyright 2017-2021 Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
+# SPDX-FileCopyrightText: Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
-# This file is part of qutebrowser.
-#
-# qutebrowser is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# qutebrowser is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>.
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for CompletionFilterModel."""
@@ -45,6 +32,11 @@ from qutebrowser.completion.models import listcategory
[('foo', 'bar'), ('bar', 'foo'), ('bar', 'bar')],
[('foo', 'bar'), ('bar', 'foo')],
[('foo', 'bar'), ('bar', 'foo')]),
+
+ ('foo bar',
+ [('foobar', ''), ('barfoo', ''), ('foobaz', '')],
+ [('barfoo', ''), ('foobar', '')],
+ [('foobar', ''), ('barfoo', '')]),
])
def test_set_pattern(pattern, before, after, after_nosort, model_validator):
"""Validate the filtering and sorting results of set_pattern."""