From 1face56bfc40005ec3af7c7d24f0e8eddc3a210b Mon Sep 17 00:00:00 2001 From: schlatterbeck Date: Sun, 27 Dec 2009 21:18:48 +0000 Subject: [PATCH] - 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 --- test/test_indexer.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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') -- 2.30.2