Skip to content

Commit 9218778

Browse files
author
Ralf Schlatterbeck
committed
- add a small word-splitting test for the indexers...
when answering an mailinglist-mail concerning indexer behaviour
1 parent 17d90b4 commit 9218778

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/test_indexer.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,14 @@ def test_casesensitity(self):
124124
[('test', '1', 'a'),
125125
('test', '2', 'a')])
126126

127+
def test_wordsplitting(self):
128+
"""Test if word splitting works."""
129+
self.dex.add_text(('test', '1', 'a'), 'aaaa-aaa bbbb*bbb')
130+
self.dex.add_text(('test', '2', 'a'), 'aaaA-aaa BBBB*BBB')
131+
for k in 'aaaa', 'aaa', 'bbbb', 'bbb':
132+
self.assertSeqEqual(self.dex.find([k]),
133+
[('test', '1', 'a'), ('test', '2', 'a')])
134+
127135
def tearDown(self):
128136
shutil.rmtree('test-index')
129137

0 commit comments

Comments
 (0)