1 23 24 package org.enhydra.xml.xmlc.html; 25 import java.lang.reflect.Method ; 26 27 import junit.framework.Test; 28 29 import org.enhydra.xml.xmlc.driver.ExecXmlc; 30 31 34 public class EncodingTests extends HtmlTestCaseBase { 35 36 37 public static Test suite() { 38 return createSuite(EncodingTests.class, null); 39 } 40 41 42 public EncodingTests(Method method) { 43 super(method); 44 } 45 46 47 private HtmlBasicTest createTest(String encoding, 48 String inputDoc) { 49 HtmlBasicTest test = createTest(inputDoc); 50 test.getOutputOptions().setEncoding(encoding); 51 test.addBoth(ExecXmlc.OPT_HTML_ENCODING, encoding); 52 return test; 53 } 54 55 59 public void test1() { 60 HtmlBasicTest test = createTest("BIG5", 61 "encodings/newscontent_big5.html"); 62 test.basicTest(); 63 } 64 65 68 public void test2() { 69 HtmlBasicTest test = createTest("BIG5", 70 "encodings/big5.page1.html"); 71 test.basicTest(); 72 } 73 74 77 public void test3() { 78 HtmlBasicTest test = createTest("GB2312", 79 "encodings/gb.page1.html"); 80 test.basicTest(); 81 } 82 83 86 public void test4() { 87 HtmlBasicTest test = createTest("ISO-2022-JP", 88 "encodings/iso-2022-jp.page1.html"); 89 90 test.setEditReloadSource(false); 95 96 test.basicTest(); 97 } 98 99 102 public void test5() { 103 } 105 106 109 public void test6() { 110 HtmlBasicTest test = createTest("BIG5", 111 "encodings/newscontent_ssi_big5.html"); 112 test.addFirst(ExecXmlc.OPT_SSI); 113 test.basicTest(); 114 } 115 116 119 public void test7() { 120 HtmlBasicTest test = createTest("Shift_JIS", 121 "encodings/emoji.chtml"); 122 test.basicTest(); 123 } 124 } 125 | Popular Tags |