lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven A Rowe <sar...@syr.edu>
Subject RE: svn commit: r1332886 - /lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestUAX29URLEmailTokenizer.java
Date Wed, 02 May 2012 00:12:48 GMT
Thanks, Robert. - Steve

-----Original Message-----
From: rmuir@apache.org [mailto:rmuir@apache.org] 
Sent: Tuesday, May 01, 2012 8:11 PM
To: commits@lucene.apache.org
Subject: svn commit: r1332886 - /lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestUAX29URLEmailTokenizer.java

Author: rmuir
Date: Wed May  2 00:10:55 2012
New Revision: 1332886

URL: http://svn.apache.org/viewvc?rev=1332886&view=rev
Log:
LUCENE-3880: add backwards test

Modified:
    lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestUAX29URLEmailTokenizer.java

Modified: lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestUAX29URLEmailTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestUAX29URLEmailTokenizer.java?rev=1332886&r1=1332885&r2=1332886&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestUAX29URLEmailTokenizer.java
(original)
+++ lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/a
+++ nalysis/core/TestUAX29URLEmailTokenizer.java Wed May  2 00:10:55 
+++ 2012
@@ -470,6 +470,21 @@ public class TestUAX29URLEmailTokenizer 
     checkOneTerm(a, "壹゙", "壹"); // ideographic Bug
     checkOneTerm(a, "아゙",  "아゙"); // hangul Works
   }
+  
+  // LUCENE-3880
+  /** @deprecated remove this and sophisticated backwards layer in 5.0 
+ */  @Deprecated  public void testMailtoBackwards()  throws Exception {
+    Analyzer a = new Analyzer() {
+      @Override
+      protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
+        Tokenizer tokenizer = new UAX29URLEmailTokenizer(Version.LUCENE_34, reader);
+        return new TokenStreamComponents(tokenizer);
+      }
+    };
+    assertAnalyzesTo(a, "mailto:test@example.org",
+        new String[] { "mailto:test", "example.org" });  }
 
   /** blast some random strings through the analyzer */
   public void testRandomStrings() throws Exception {


Mime
View raw message