Index: test/org/apache/lucene/analysis/TestStandardAnalyzer.java =================================================================== --- test/org/apache/lucene/analysis/TestStandardAnalyzer.java (revision 601666) +++ test/org/apache/lucene/analysis/TestStandardAnalyzer.java (working copy) @@ -92,7 +92,10 @@ public void testDomainNames() throws Exception { // domain names - assertAnalyzesTo(a, "www.nutch.org", new String[]{"www.nutch.org" }); + assertAnalyzesTo(a, "www.nutch.org", new String[]{"www.nutch.org" }, new String[] { "" }); + // the following should be recognized as HOST. It was wrongly recognized as + // an ACRONYM. + assertAnalyzesTo(a, "www.nutch.org.", new String[]{ "www.nutch.org" }, new String[] { "" }); } public void testEMailAddresses() throws Exception { @@ -128,7 +131,7 @@ public void testAcronyms() throws Exception { // acronyms have their dots stripped - assertAnalyzesTo(a, "U.S.A.", new String[]{ "usa" }); + assertAnalyzesTo(a, "U.S.A.", new String[]{ "usa" }, new String[] { "" }); } public void testCPlusPlusHash() throws Exception { @@ -196,4 +199,12 @@ "", "", "", "", "", "", "" }); } + + public void testDeprecatedAcronyms() throws Exception { + // test backward compatibility for applications that require the old behavior. + // this should be removed once replaceDepAcronym is removed. + ((StandardAnalyzer) a).replaceDepAcronym = false; + assertAnalyzesTo(a, "lucene.apache.org.", new String[]{ "luceneapacheorg" }, new String[] { "" }); + } + }