tests: make sure we don't over-match

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@990177 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-08-27 15:37:08 +00:00
parent 5204bd9c42
commit 949e1d7150
1 changed files with 9 additions and 3 deletions

View File

@ -902,13 +902,16 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
assertQ(req("id:42 AND subword:\"bar foo\"")
,"*[count(//doc)=0]"
);
assertQ(req("id:42 AND subword:bar-foo")
,"*[count(//doc)=0]"
);
assertQ(req("id:42 AND subword:\"bar foo\"~2")
,"*[count(//doc)=1]"
);
assertQ(req("id:42 AND subword:\"foo/bar\"")
assertQ(req("id:42 AND subword:foo/bar")
,"*[count(//doc)=1]"
);
assertQ(req("id:42 AND subword:\"foobar\"")
assertQ(req("id:42 AND subword:foobar")
,"*[count(//doc)=0]"
);
@ -926,10 +929,13 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
assertQ(req("id:42 AND subword:\"bar foo\"")
,"*[count(//doc)=0]"
);
assertQ(req("id:42 AND subword:bar-foo")
,"*[count(//doc)=0]"
);
assertQ(req("id:42 AND subword:\"bar foo\"~2")
,"*[count(//doc)=1]"
);
assertQ(req("id:42 AND subword:\"foo/bar\"")
assertQ(req("id:42 AND subword:foo/bar")
,"*[count(//doc)=1]"
);
assertQ(req("id:42 AND subword:foobar")