1 # Copyright(C) 2006 Brazil
3 # This is free software with ABSOLUTELY NO WARRANTY.
5 # You can redistribute it and/or modify it under the terms of
6 # the GNU General Public License version 2.
11 class FixedBugRev00346Test < Test::Unit::TestCase
12 def test_sen_set_reset_gc_bug
13 index = TestIndex::create(0, Senna::INDEX_DELIMITED)
15 index.update(1, 1, nil, 'MySQL has now support for full-text search')
16 index.update(2, 1, nil, 'Full-text indexes are called collections')
17 index.update(3, 1, nil, 'Only MyISAM tables support collections')
18 index.update(4, 1, nil, 'Function MATCH ... AGAINST() is used to do a search')
19 index.update(5, 1, nil, 'Full-text search in MySQL implements vector space model')
21 rcs = index.query_exec(Senna::Query::open('+(support collections) +foobar*'), nil, Senna::SEL_OR)
22 assert_equal(0, rcs.nhits)
23 rcs = index.query_exec(Senna::Query::open('+(+(support collections)) +foobar*'), nil, Senna::SEL_OR)
24 assert_equal(0, rcs.nhits)