String result = conv.toWiki(new ToTrac());
assertEquals(result, "\n" + "== the good ==\n" + "\n" + "=== the bad ===\n" + "\n" + "== and the ugly ==\n");
}
public void test4() {
HTML2WikiConverter conv = new HTML2WikiConverter();
// invalid nested html test
conv.setInputHTML("<table>\n" + "<tr>\n"
+ "<td><i><a href=\"/wiki/Klasse_%28Biologie%29\" title=\"Klasse (Biologie)\">Klasse</a>:</i></td>\n"
+ "<td><a href=\"/wiki/V%C3%B6gel\" title=\"Vögel\">Vögel</a> (Aves)</td>\n" + "</tr>\n" + "<tr>\n"
+ "<td><i><a href=\"/wiki/Klasse_%28Biologie%29\" title=\"Klasse (Biologie)\">Unterklasse</a>:</i></td>\n"
+ "<td><a href=\"/wiki/Urkieferv%C3%B6gel\" title=\"Urkiefervögel\">Urkiefervögel</a> (Palaeognathae)</td>\n" + "\n"
+ "</tr>\n" + "<tr>\n"
+ "<td><i><a href=\"/wiki/Ordnung_%28Biologie%29\" title=\"Ordnung (Biologie)\">Ordnung</a>:</i></td>\n"
+ "<td><a href=\"/wiki/Laufv%C3%B6gel\" title=\"Laufvögel\">Laufvögel</a> (Struthioniformes)</td>\n" + "</tr>\n" + "<tr>\n"
+ "<td><i><a href=\"/wiki/Familie_%28Biologie%29\" title=\"Familie (Biologie)\">Familie</a>:</i></td>\n"
+ "<td>Strauße (Struthionidae)</td>\n" + "</tr>\n" + "\n" + "<tr>\n"
+ "<td><i><a href=\"/wiki/Gattung_%28Biologie%29\" title=\"Gattung (Biologie)\">Gattung</a>:</i></td>\n"
+ "<td>Strauße (<i>Struthio</i>)</td>\n" + "</tr>\n" + "<tr>\n"
+ "<td><i><a href=\"/wiki/Art_%28Biologie%29\" title=\"Art (Biologie)\">Art</a>:</i></td>\n"
+ "<td>Afrikanischer Strauß</td>\n" + "</tr>\n" + "</table>");
String result = conv.toWiki(new ToTrac());
assertEquals(result, " \n" +
"||\'\'[wiki:Klasse]:\'\'||[wiki:Vögel] (Aves)||\n" +
"||\'\'[wiki:Unterklasse]:\'\'||[wiki:Urkiefervögel] (Palaeognathae)||\n" +
"||\'\'[wiki:Ordnung]:\'\'||[wiki:Laufvögel] (Struthioniformes)||\n" +
"||\'\'[wiki:Familie]:\'\'||Strauße (Struthionidae)||\n" +