+
+
+ public void testWiktionary_en_de2fr() throws Exception {
+ wiktionaryTestWithEnTrans2Trans("wiktionary.de_fr.quickdic", "DE", "FR");
+ }
+
+ public void wiktionaryTestWithEnTrans2Trans(final String name, final String lang1,
+ final String lang2) throws Exception {
+ final File result = new File(TEST_OUTPUTS + name);
+ System.out.println("Writing to: " + result);
+ DictionaryBuilder.main(new String[] {
+ "--dictOut=" + result.getAbsolutePath(),
+ "--lang1=" + lang1,
+ "--lang2=" + lang2,
+ "--lang1Stoplist=" + STOPLISTS + "empty.txt",
+ "--lang2Stoplist=" + STOPLISTS + "empty.txt",
+ "--dictInfo=SomeWikiDataTrans2Trans",
+
+ "--input4=" + WIKISPLIT + "EN.data",
+ "--input4Name=" + name,
+ "--input4Format=" + EnTranslationToTranslationParser.NAME,
+ "--input4LangPattern1=" + lang1,
+ "--input4LangPattern2=" + lang2,
+ "--input4PageLimit=1000",
+
+ "--print=" + result.getPath() + ".text",
+ });
+
+ checkGolden(name, result);
+ }
+
+ public void testWiktionary_WholeSection_DE() throws Exception {
+ wiktionaryTestWithWholeSectionToHtml("wiktionary.WholeSection.DE.quickdic", "DE");
+ }
+
+ public void testWiktionary_WholeSection_EN() throws Exception {
+ wiktionaryTestWithWholeSectionToHtml("wiktionary.WholeSection.EN.quickdic", "EN");
+ }
+
+ public void testWiktionary_WholeSection_IT() throws Exception {
+ wiktionaryTestWithWholeSectionToHtml("wiktionary.WholeSection.IT.quickdic", "IT");
+ }
+
+ public void wiktionaryTestWithWholeSectionToHtml(final String name, final String langCode) throws Exception {
+ final File result = new File(TEST_OUTPUTS + name);
+ System.out.println("Writing to: " + result);
+ DictionaryBuilder.main(new String[] {
+ "--dictOut=" + result.getAbsolutePath(),
+ "--lang1=" + langCode,
+ "--lang2=" + "EN",
+ "--lang1Stoplist=" + STOPLISTS + "empty.txt",
+ "--lang2Stoplist=" + STOPLISTS + "empty.txt",
+ "--dictInfo=SomeWikiDataWholeSection",
+
+ "--input4=" + WIKISPLIT + langCode + ".data",
+ "--input4Name=" + name,
+ "--input4Format=" + WholeSectionToHtmlParser.NAME,
+ "--input4TitleIndex=" + "1",
+ "--input4PageLimit=100",
+
+ "--print=" + result.getPath() + ".text",
+ });
+ checkGolden(name, result);
+ }
+