Skip to content

Commit 779b18a

Browse files
author
justin caratzas
committed
added test for autocomplete whitespace fix
1 parent 3ef5644 commit 779b18a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/whoosh_tests/tests/test_whoosh_backend.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,10 @@ def test_edgengram_regression(self):
956956
autocomplete = self.sqs.autocomplete(text_auto='ngm')
957957
self.assertEqual(autocomplete.count(), 0)
958958

959+
def test_extra_whitespace(self):
960+
autocomplete = self.sqs.autocomplete(text_auto='mod ')
961+
self.assertEqual(autocomplete.count(), 5)
962+
959963

960964
class WhooshRoundTripSearchIndex(indexes.SearchIndex, indexes.Indexable):
961965
text = indexes.CharField(document=True, default='')

0 commit comments

Comments
 (0)