package tests.net.sf.jabref.export.layout;
import junit.framework.TestCase;
import net.sf.jabref.export.layout.LayoutFormatter;
import net.sf.jabref.export.layout.format.HTMLChars;
public class HTMLCharsTest extends TestCase {
public void testBasicFormat() {
LayoutFormatter layout = new HTMLChars();
assertEquals("", layout.format(""));
assertEquals("hallo", layout.format("hallo"));
assertEquals("R�flexions sur le timing de la quantit�", layout
.format("R�flexions sur le timing de la quantit�"));
assertEquals("hállo", layout.format("h\\'allo"));
assertEquals("ı ı", layout.format("\\i \\i"));
assertEquals("ı", layout.format("\\i"));
assertEquals("ı", layout.format("\\{i}"));
assertEquals("ıı", layout.format("\\i\\i"));
assertEquals("Ŀı", layout.format("\\Lmidot\\i"));
assertEquals("ñ ñ í ı ı", layout.format("\\~{n} \\~n \\'i \\i \\i"));
}
public void testLaTeXHighlighting() {
LayoutFormatter layout = new HTMLChars();
assertEquals("<em>hallo</em>", layout.format("\\emph{hallo}"));
assertEquals("<em>hallo</em>", layout.format("{\\emph hallo}"));
assertEquals("<em>hallo</em>", layout.format("\\textit{hallo}"));
assertEquals("<em>hallo</em>", layout.format("{\\textit hallo}"));
assertEquals("<b>hallo</b>", layout.format("\\textbf{hallo}"));
assertEquals("<b>hallo</b>", layout.format("{\\textbf hallo}"));
}
/*
* Is missing a lot of test cases for the individual chars...
*/
}