diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/charfilter/TestHTMLStripCharFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/charfilter/TestHTMLStripCharFilter.java index d5122406261..6253517f457 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/charfilter/TestHTMLStripCharFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/charfilter/TestHTMLStripCharFilter.java @@ -33,6 +33,7 @@ import org.apache.lucene.index.IndexWriter; import org.apache.lucene.tests.analysis.BaseTokenStreamTestCase; import org.apache.lucene.tests.analysis.MockTokenizer; import org.apache.lucene.tests.util.TestUtil; +import org.junit.Ignore; public class TestHTMLStripCharFilter extends BaseTokenStreamTestCase { @@ -649,6 +650,17 @@ public class TestHTMLStripCharFilter extends BaseTokenStreamTestCase { assertEquals("Test\n\n\n\nSome text.", result.toString().trim()); } + @Ignore("Fails due to PR #11724") + public void testForIssue10520Regression() throws IOException { + String test = + "Testa link some text another link"; + Reader reader = new StringReader(test); + HTMLStripCharFilter filter = new HTMLStripCharFilter(reader); + StringWriter result = new StringWriter(); + filter.transferTo(result); + assertEquals("Test\n\na link some text another link", result.toString().trim()); + } + public static void assertHTMLStripsTo(String input, String gold, Set escapedTags) throws Exception { assertHTMLStripsTo(new StringReader(input), gold, escapedTags);