changeset 4314:b41a033bffcc

- add a small word-splitting test for the indexers... when answering an mailinglist-mail concerning indexer behaviour
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Sun, 27 Dec 2009 21:18:48 +0000
parents 7a6c5c117879
children cfb01b2bc730
files test/test_indexer.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/test_indexer.py	Sun Dec 27 20:05:32 2009 +0000
+++ b/test/test_indexer.py	Sun Dec 27 21:18:48 2009 +0000
@@ -124,6 +124,14 @@
                                                     [('test', '1', 'a'),
                                                      ('test', '2', 'a')])
 
+    def test_wordsplitting(self):
+        """Test if word splitting works."""
+        self.dex.add_text(('test', '1', 'a'), 'aaaa-aaa bbbb*bbb')
+        self.dex.add_text(('test', '2', 'a'), 'aaaA-aaa BBBB*BBB')
+        for k in 'aaaa', 'aaa', 'bbbb', 'bbb':
+            self.assertSeqEqual(self.dex.find([k]),
+                [('test', '1', 'a'), ('test', '2', 'a')])
+
     def tearDown(self):
         shutil.rmtree('test-index')
 

Roundup Issue Tracker: http://roundup-tracker.org/