From: schlatterbeck Date: Sun, 27 Dec 2009 21:18:48 +0000 (+0000) Subject: - add a small word-splitting test for the indexers when answering an X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1face56bfc40005ec3af7c7d24f0e8eddc3a210b;p=roundup.git - add a small word-splitting test for the indexers when answering an mailinglist-mail concerning indexer behaviour git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4418 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/test/test_indexer.py b/test/test_indexer.py index 1b4d909..5d8a395 100644 --- a/test/test_indexer.py +++ b/test/test_indexer.py @@ -124,6 +124,14 @@ class IndexerTest(unittest.TestCase): [('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')