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.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit/completion/test_listcategory.py b/tests/unit/completion/test_listcategory.py
index 1a54ac814..3a4fa895d 100644
--- a/tests/unit/completion/test_listcategory.py
+++ b/tests/unit/completion/test_listcategory.py
@@ -20,6 +20,7 @@
"""Tests for CompletionFilterModel."""
import pytest
+import logging
from qutebrowser.completion.models import listcategory
@@ -57,3 +58,9 @@ def test_set_pattern(pattern, before, after, after_nosort, model_validator):
model_validator.set_model(cat)
cat.set_pattern(pattern)
model_validator.validate(after_nosort)
+
+
+def test_long_pattern(caplog):
+ """Validate that a huge pattern doesn't crash (#5973)."""
+ with caplog.at_level(logging.WARNING):
+ listcategory.ListCategory('Foo', []).set_pattern('a' * 50000)