]> gitweb.fperrin.net Git - DictionaryPC.git/blobdiff - src/com/hughes/android/dictionary/engine/DictionaryBuilderTest.java
go
[DictionaryPC.git] / src / com / hughes / android / dictionary / engine / DictionaryBuilderTest.java
index 18125aec60a6ba11a8e65674ab377d1bbb1e8447..417df82d420112076e0423ca1a61abf70f675780 100644 (file)
@@ -139,19 +139,19 @@ public class DictionaryBuilderTest extends TestCase {
   }
 
   public void testWiktionary_WholeSection_DE() throws Exception {
-    wiktionaryTestWithWholeSectionToHtml("wiktionary.WholeSection.DE.quickdic", "DE", 100);
+    enWiktionaryTestWithWholeSectionToHtml("enwiktionary.WholeSection.DE.quickdic", "DE", 100);
   }
 
   public void testWiktionary_WholeSection_EN() throws Exception {
-    wiktionaryTestWithWholeSectionToHtml("wiktionary.WholeSection.EN.quickdic", "EN", 100);
+    enWiktionaryTestWithWholeSectionToHtml("enwiktionary.WholeSection.EN.quickdic", "EN", 100);
   }
 
   public void testWiktionary_WholeSection_IT() throws Exception {
     // Have to run to 800 to get a few verb conjugations (including essere!)
-    wiktionaryTestWithWholeSectionToHtml("wiktionary.WholeSection.IT.quickdic", "IT", 800);
+    enWiktionaryTestWithWholeSectionToHtml("enwiktionary.WholeSection.IT.quickdic", "IT", 800);
   }
 
-  public void wiktionaryTestWithWholeSectionToHtml(final String name, final String langCode, final int pageLimit) throws Exception {
+  public void enWiktionaryTestWithWholeSectionToHtml(final String name, final String langCode, final int pageLimit) throws Exception {
     final File result = new File(TEST_OUTPUTS + name);
     System.out.println("Writing to: " + result);
     DictionaryBuilder.main(new String[] {
@@ -325,6 +325,27 @@ public class DictionaryBuilderTest extends TestCase {
     checkGolden(name, result); 
   }
 
+  public void testItalianTurkish() throws Exception {
+      final String name = "it-tr_dictcc.quickdic";
+      final File result = new File(TEST_OUTPUTS + name);
+      System.out.println("Writing to: " + result);
+      DictionaryBuilder.main(new String[] {
+          "--dictOut=" + result.getAbsolutePath(),
+          "--lang1=IT",
+          "--lang2=TR",
+          "--dictInfo=it-tr_dictcc_simulated",
+
+          "--input1=" + TEST_INPUTS + "it-tr_dictcc_simulated.txt",
+          "--input1Name=dictcc",
+          "--input1Charset=UTF8",
+          "--input1Format=tab_separated",
+
+          "--print=" + result.getPath() + ".text",
+      });
+      
+      checkGolden(name, result); 
+    }
+
   private void checkGolden(final String dictName, final File dictFile)
       throws IOException, FileNotFoundException {
     // Check it once: