LUCENE-792: add test for PrecedenceQueryParser NOT bug

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1063478 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-01-25 22:00:14 +00:00
parent dfb9a0faf8
commit a4a913d01b
1 changed files with 6 additions and 0 deletions

View File

@ -567,6 +567,12 @@ public class TestPrecedenceQueryParser extends LuceneTestCase {
// too many boolean clauses, so ParseException is expected
}
}
// LUCENE-792
public void testNOT() throws Exception {
Analyzer a = new MockAnalyzer(MockTokenizer.WHITESPACE, false);
assertQueryEquals("NOT foo AND bar", a, "-foo +bar");
}
/**
* This test differs from the original QueryParser, showing how the precedence