For fa analyzer, add a test for custom stopwords

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@823546 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2009-10-09 13:27:14 +00:00
parent 956c8cda82
commit 877c9ff521
1 changed files with 9 additions and 0 deletions

View File

@ -213,5 +213,14 @@ public class TestPersianAnalyzer extends BaseTokenStreamTestCase {
assertAnalyzesToReuse(a, "خورده مي شده بوده باشد", new String[] { "خورده" });
assertAnalyzesToReuse(a, "برگ‌ها", new String[] { "برگ" });
}
/**
* Test that custom stopwords work, and are not case-sensitive.
*/
public void testCustomStopwords() throws Exception {
PersianAnalyzer a = new PersianAnalyzer(new String[] { "the", "and", "a" });
assertAnalyzesTo(a, "The quick brown fox.", new String[] { "quick",
"brown", "fox" });
}
}