Ticket #515: xapian_ticket_515_test.patch
File xapian_ticket_515_test.patch, 855 bytes (added by , 14 years ago) |
---|
-
queryparsertest.cc
2293 2293 #endif 2294 2294 } 2295 2295 2296 // Regression test for a bug reported in 1.2.3 with default_op of AND_MAYBE 2297 static bool test_qp_and_maybe_near() 2298 { 2299 Xapian::QueryParser qp; 2300 qp.set_default_op(Xapian::Query::OP_AND_MAYBE); 2301 // 1.2.3 segfaults when parsing the following query. 2302 TEST_EXCEPTION(Xapian::InvalidArgumentError, 2303 qp.parse_query("a-b NEAR c NEAR d")); 2304 return true; 2305 } 2306 2296 2307 /// Test cases for the QueryParser. 2297 2308 static const test_desc tests[] = { 2298 2309 TESTCASE(queryparser1), … … 2328 2339 TESTCASE(qp_scale1), 2329 2340 TESTCASE(qp_near1), 2330 2341 TESTCASE(qp_stopword_group1), 2342 TESTCASE(qp_and_maybe_near), 2331 2343 END_OF_TESTCASES 2332 2344 }; 2333 2345