Apache Lucene open-source search software
For fa analyzer, add a test for custom stopwords
Robert Muir877c9ff52191
diff --git a/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fa/TestPersianAnalyzer.java b/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fa/TestPersianAnalyzer.javaindex a6629e2d1b5..cdc995dbbaf 100644--- a/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fa/TestPersianAnalyzer.java+++ b/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fa/TestPersianAnalyzer.java@@ -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" });+ }}