lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-lucene/src/test/org/apache/lucene/analysis/ru TestRussianAnalyzer.java
Date Tue, 30 Sep 2003 03:09:15 GMT
ehatcher    2003/09/29 20:09:15

  Modified:    src/test/org/apache/lucene/analysis/ru
                        TestRussianAnalyzer.java
  Log:
  #23505 - Hani's patch to fix RussianAnalyzer test
  
  Revision  Changes    Path
  1.4       +10 -14    jakarta-lucene/src/test/org/apache/lucene/analysis/ru/TestRussianAnalyzer.java
  
  Index: TestRussianAnalyzer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/analysis/ru/TestRussianAnalyzer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestRussianAnalyzer.java	29 Jan 2003 17:43:13 -0000	1.3
  +++ TestRussianAnalyzer.java	30 Sep 2003 03:09:15 -0000	1.4
  @@ -56,11 +56,7 @@
   
   import junit.framework.TestCase;
   
  -import java.io.FileReader;
  -
  -import java.io.InputStreamReader;
  -import java.io.FileInputStream;
  -import java.io.IOException;
  +import java.io.*;
   
   import org.apache.lucene.analysis.TokenStream;
   import org.apache.lucene.analysis.Token;
  @@ -78,13 +74,13 @@
   
       private InputStreamReader sampleUnicode;
   
  -    private FileReader inWordsKOI8;
  +    private Reader inWordsKOI8;
   
  -    private FileReader sampleKOI8;
  +    private Reader sampleKOI8;
   
  -    private FileReader inWords1251;
  +    private Reader inWords1251;
   
  -    private FileReader sample1251;
  +    private Reader sample1251;
   
       public TestRussianAnalyzer(String name)
       {
  @@ -155,9 +151,9 @@
           //System.out.println(new java.util.Date());
           RussianAnalyzer ra = new RussianAnalyzer(RussianCharsets.KOI8);
           // KOI8
  -        inWordsKOI8 = new FileReader("src/test/org/apache/lucene/analysis/ru/testKOI8.txt");
  +        inWordsKOI8 = new InputStreamReader(new FileInputStream("src/test/org/apache/lucene/analysis/ru/testKOI8.txt"),
"iso-8859-1");
   
  -        sampleKOI8 = new FileReader("src/test/org/apache/lucene/analysis/ru/resKOI8.htm");
  +        sampleKOI8 = new InputStreamReader(new FileInputStream("src/test/org/apache/lucene/analysis/ru/resKOI8.htm"),
"iso-8859-1");
   
           TokenStream in = ra.tokenStream("all", inWordsKOI8);
           RussianLetterTokenizer sample =
  @@ -191,9 +187,9 @@
       public void test1251() throws IOException
       {
           // 1251
  -        inWords1251 = new FileReader("src/test/org/apache/lucene/analysis/ru/test1251.txt");
  +        inWords1251 = new InputStreamReader(new FileInputStream("src/test/org/apache/lucene/analysis/ru/test1251.txt"),
"iso-8859-1");
   
  -        sample1251 = new FileReader("src/test/org/apache/lucene/analysis/ru/res1251.htm");
  +        sample1251 = new InputStreamReader(new FileInputStream("src/test/org/apache/lucene/analysis/ru/res1251.htm"),
"iso-8859-1");
   
           RussianAnalyzer ra = new RussianAnalyzer(RussianCharsets.CP1251);
           TokenStream in = ra.tokenStream("", inWords1251);
  
  
  

Mime
View raw message