From: <rb...@us...> - 2017-06-23 16:41:46
|
Revision: 14630 http://sourceforge.net/p/htmlunit/code/14630 Author: rbri Date: 2017-06-23 16:41:44 +0000 (Fri, 23 Jun 2017) Log Message: ----------- take care of bom headers when downloading js Issue 1895 Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebResponse.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlScript3Test.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebResponse.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebResponse.java 2017-06-21 17:37:23 UTC (rev 14629) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebResponse.java 2017-06-23 16:41:44 UTC (rev 14630) @@ -22,9 +22,12 @@ import java.io.Serializable; import java.net.URL; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.List; +import org.apache.commons.io.ByteOrderMark; import org.apache.commons.io.IOUtils; +import org.apache.commons.io.input.BOMInputStream; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -45,6 +48,10 @@ public class WebResponse implements Serializable { private static final Log LOG = LogFactory.getLog(WebResponse.class); + private static final ByteOrderMark[] BOM_HEADERS = new ByteOrderMark[] { + ByteOrderMark.UTF_8, + ByteOrderMark.UTF_16LE, + ByteOrderMark.UTF_16BE}; private long loadTime_; private WebResponseData responseData_; @@ -238,6 +245,7 @@ /** * Returns the response content as a string, using the specified charset, * rather than the charset/encoding specified in the server response. + * If there is a bom header the charset parameter will be overwritten by the bom. * @param encoding the charset/encoding to use to convert the response content into a string * @return the response content as a string or null if the content retrieval was failing */ @@ -245,7 +253,22 @@ if (responseData_ != null) { try (InputStream in = responseData_.getInputStream()) { if (in != null) { - return IOUtils.toString(in, encoding); + try (BOMInputStream bomIn = new BOMInputStream(in, BOM_HEADERS)) { + // there seems to be a bug in BOMInputStream + // we have to call this before hasBOM(ByteOrderMark) + if (bomIn.hasBOM()) { + if (bomIn.hasBOM(ByteOrderMark.UTF_8)) { + return IOUtils.toString(bomIn, StandardCharsets.UTF_8); + } + if (bomIn.hasBOM(ByteOrderMark.UTF_16BE)) { + return IOUtils.toString(bomIn, StandardCharsets.UTF_16BE); + } + if (bomIn.hasBOM(ByteOrderMark.UTF_16LE)) { + return IOUtils.toString(bomIn, StandardCharsets.UTF_16LE); + } + } + return IOUtils.toString(bomIn, encoding); + } } } catch (final IOException e) { Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java 2017-06-21 17:37:23 UTC (rev 14629) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java 2017-06-23 16:41:44 UTC (rev 14630) @@ -61,6 +61,7 @@ import org.w3c.dom.ProcessingInstruction; import org.w3c.dom.ranges.Range; +import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.Cache; import com.gargoylesoftware.htmlunit.ElementNotFoundException; import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; @@ -1020,9 +1021,8 @@ final WebRequest referringRequest = getWebResponse().getWebRequest(); final WebClient client = getWebClient(); - final Cache cache = client.getCache(); - - final WebRequest request = new WebRequest(url, getWebClient().getBrowserVersion().getScriptAcceptHeader()); + final BrowserVersion browser = client.getBrowserVersion(); + final WebRequest request = new WebRequest(url, browser.getScriptAcceptHeader()); request.setAdditionalHeaders(new HashMap<>(referringRequest.getAdditionalHeaders())); request.setAdditionalHeader("Referer", referringRequest.getUrl().toString()); request.setAdditionalHeader("Accept", client.getBrowserVersion().getScriptAcceptHeader()); @@ -1034,6 +1034,7 @@ // now we can look into the cache with the fixed request for // a cached script + final Cache cache = client.getCache(); final Object cachedScript = cache.getCachedObject(request); if (cachedScript instanceof Script || cachedScript instanceof ScriptFunction) { return cachedScript; Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlScript3Test.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlScript3Test.java 2017-06-21 17:37:23 UTC (rev 14629) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlScript3Test.java 2017-06-23 16:41:44 UTC (rev 14630) @@ -14,11 +14,13 @@ */ package com.gargoylesoftware.htmlunit.html; +import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; import static java.nio.charset.StandardCharsets.ISO_8859_1; import static java.nio.charset.StandardCharsets.UTF_8; import java.net.URL; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -35,6 +37,7 @@ import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner; import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner.Default; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.WebDriverTestCase; /** @@ -45,12 +48,14 @@ @RunWith(BrowserParameterizedRunner.class) public class HtmlScript3Test extends WebDriverTestCase { + private static final String BOM_UTF_16LE = "BOMUTF16LE"; private static final String BOM_UTF_16BE = "BOMUTF16BE"; private static final String BOM_UTF_8 = "BOMUTF8"; private enum TestCharset { UTF8("UTF8", UTF_8), - ISO88591("ISO88591", ISO_8859_1); + ISO88591("ISO88591", ISO_8859_1), + GB2312("GB2312", Charset.forName("GB2312")); private final String label_; private final Charset charset_; @@ -80,11 +85,11 @@ final List<Object[]> list = new ArrayList<>(); final TestCharset[] charsetHtmlResponseHeader = - new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591}; + new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.GB2312}; final TestCharset[] charsetAttribute = new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591}; final TestCharset[] charsetResponseHeader = new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591}; final TestCharset[] charsetResponseEncoding = new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591}; - final String[] bom = new String[] {null, BOM_UTF_8, BOM_UTF_16BE}; + final String[] bom = new String[] {null, BOM_UTF_8, BOM_UTF_16LE, BOM_UTF_16BE}; for (final Object charsetHtml : charsetHtmlResponseHeader) { for (final Object attribute : charsetAttribute) { @@ -135,7 +140,7 @@ * @throws Exception if an error occurs */ @Test - @Alerts("أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) @Default public void charset() throws Exception { charset(charsetHtmlResponseHeader_, charsetAttribute_, charsetResponseHeader_, charsetResponseEncoding_, bom_); @@ -153,6 +158,7 @@ String html = "<html><head>\n" + + " <script type='text/javascript'>window.onerror=function(msg) { alert(msg); }</script>" + " <script src='" + cssUrl + "'"; if (charsetAttribute != null) { html = html + " charset='" + charsetAttribute.getCharset().name().toLowerCase() + "'"; @@ -167,7 +173,7 @@ scriptContentType = scriptContentType + "; charset=" + charsetResponseHeader.getCharset().name().toLowerCase(); } - final String js = "alert('أهلاً');"; + final String js = "alert('a'); alert('ä'); alert('أهلاً'); alert('мир'); alert('房间');"; byte[] script = null; if (charsetResponseEncoding == null) { @@ -178,11 +184,14 @@ } if (BOM_UTF_8.equals(bom)) { - script = ArrayUtils.addAll(ByteOrderMark.UTF_8.getBytes(), script); + script = ArrayUtils.addAll(ByteOrderMark.UTF_8.getBytes(), js.getBytes(StandardCharsets.UTF_8)); } else if (BOM_UTF_16BE.equals(bom)) { - script = ArrayUtils.addAll(ByteOrderMark.UTF_16BE.getBytes(), script); + script = ArrayUtils.addAll(ByteOrderMark.UTF_16BE.getBytes(), js.getBytes(StandardCharsets.UTF_16BE)); } + else if (BOM_UTF_16LE.equals(bom)) { + script = ArrayUtils.addAll(ByteOrderMark.UTF_16LE.getBytes(), js.getBytes(StandardCharsets.UTF_16LE)); + } getMockWebConnection().setResponse(cssUrl, script, 200, "OK", scriptContentType, null); String htmlContentType = "text/html"; @@ -195,14 +204,25 @@ htmlResponseCharset = charsetHtmlResponse.getCharset(); } + expandExpectedAlertsVariables(URL_FIRST); + final String[] expectedAlerts = getExpectedAlerts(); try { - expandExpectedAlertsVariables(URL_FIRST); - final String[] expectedAlerts = getExpectedAlerts(); - final WebDriver driver = loadPage2(html, URL_FIRST, htmlContentType, htmlResponseCharset, null); - verifyAlerts(DEFAULT_WAIT_TIME, driver, expectedAlerts); + if (expectedAlerts.length == 1) { + final List<String> actualAlerts = getCollectedAlerts(DEFAULT_WAIT_TIME, driver, expectedAlerts.length); + assertEquals(1, actualAlerts.size()); + + final String msg = actualAlerts.get(0); + assertEquals(expectedAlerts[0], "Invalid token"); + assertTrue(msg, msg.contains("Invalid or unexpected token") + || msg.contains("illegal character") + || msg.contains("Ungültiges Zeichen")); + } + else { + verifyAlerts(DEFAULT_WAIT_TIME, driver, expectedAlerts); + } } catch (final WebDriverException e) { if (!e.getCause().getMessage().contains("illegal character") @@ -209,6 +229,10 @@ && !e.getCause().getMessage().contains("is not defined.")) { throw e; } + + assertTrue(expectedAlerts.length == 1); + final String msg = e.getCause().getMessage(); + assertTrue(msg, msg.contains(expectedAlerts[0])); } } @@ -216,7 +240,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591____() throws Exception { charset(TestCharset.ISO88591, null, null, null, null); } @@ -225,15 +249,7 @@ * @throws Exception if the test fails */ @Test - public void _ISO88591____BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, null, null, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591___UTF8_() throws Exception { charset(TestCharset.ISO88591, null, null, TestCharset.UTF8, null); } @@ -242,15 +258,7 @@ * @throws Exception if the test fails */ @Test - public void _ISO88591___UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, null, null, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") + @Alerts({"a", "ä", "?????", "???", "??"}) public void _ISO88591___ISO88591_() throws Exception { charset(TestCharset.ISO88591, null, null, TestCharset.ISO88591, null); } @@ -259,40 +267,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void _ISO88591___ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.ISO88591, null, null, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _ISO88591___ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, null, null, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _ISO88591__UTF8__BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, null, TestCharset.UTF8, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _ISO88591__UTF8_UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, null, TestCharset.UTF8, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") + @Alerts({"a", "�", "?????", "???", "??"}) public void _ISO88591__UTF8_ISO88591_() throws Exception { charset(TestCharset.ISO88591, null, TestCharset.UTF8, TestCharset.ISO88591, null); } @@ -301,24 +276,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void _ISO88591__UTF8_ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.ISO88591, null, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _ISO88591__UTF8_ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, null, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591__ISO88591__() throws Exception { charset(TestCharset.ISO88591, null, TestCharset.ISO88591, null, null); } @@ -327,8 +285,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "أهلاً", - IE = "أهلاً") + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) public void _ISO88591__ISO88591__BOMUTF8() throws Exception { charset(TestCharset.ISO88591, null, TestCharset.ISO88591, null, BOM_UTF_8); } @@ -337,15 +296,7 @@ * @throws Exception if the test fails */ @Test - public void _ISO88591__ISO88591__BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, null, null, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591__ISO88591_UTF8_() throws Exception { charset(TestCharset.ISO88591, null, TestCharset.ISO88591, TestCharset.UTF8, null); } @@ -354,8 +305,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "أهلاً", - IE = "أهلاً") + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) public void _ISO88591__ISO88591_UTF8_BOMUTF8() throws Exception { charset(TestCharset.ISO88591, null, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_8); } @@ -364,15 +316,7 @@ * @throws Exception if the test fails */ @Test - public void _ISO88591__ISO88591_UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, null, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") + @Alerts({"a", "ä", "?????", "???", "??"}) public void _ISO88591__ISO88591_ISO88591_() throws Exception { charset(TestCharset.ISO88591, null, TestCharset.ISO88591, TestCharset.ISO88591, null); } @@ -381,17 +325,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void _ISO88591__ISO88591_ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.ISO88591, null, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = {}, - IE = "?????") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591__ISO88591_ISO88591_BOMUTF16BE() throws Exception { charset(TestCharset.ISO88591, null, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_16BE); } @@ -400,23 +334,7 @@ * @throws Exception if the test fails */ @Test - public void _ISO88591_UTF8___BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, TestCharset.UTF8, null, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _ISO88591_UTF8__UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, TestCharset.UTF8, null, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") + @Alerts({"a", "�", "?????", "???", "??"}) public void _ISO88591_UTF8__ISO88591_() throws Exception { charset(TestCharset.ISO88591, TestCharset.UTF8, null, TestCharset.ISO88591, null); } @@ -425,25 +343,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void _ISO88591_UTF8__ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.ISO88591, TestCharset.UTF8, null, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _ISO88591_UTF8__ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, TestCharset.UTF8, null, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = {}, - IE = "أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_UTF8_UTF8__BOMUTF16BE() throws Exception { charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, null, BOM_UTF_16BE); } @@ -452,8 +352,7 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {}, - IE = "أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_UTF8_UTF8_UTF8_BOMUTF16BE() throws Exception { charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, TestCharset.UTF8, BOM_UTF_16BE); } @@ -462,7 +361,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") + @Alerts({"a", "�", "?????", "???", "??"}) public void _ISO88591_UTF8_UTF8_ISO88591_() throws Exception { charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null); } @@ -471,17 +370,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void _ISO88591_UTF8_UTF8_ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = {}, - IE = "?????") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_UTF8_UTF8_ISO88591_BOMUTF16BE() throws Exception { charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_16BE); } @@ -490,7 +379,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_UTF8_ISO88591__() throws Exception { charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, null); } @@ -499,8 +388,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "أهلاً", - IE = "أهلاً") + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) public void _ISO88591_UTF8_ISO88591__BOMUTF8() throws Exception { charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, BOM_UTF_8); } @@ -509,15 +399,7 @@ * @throws Exception if the test fails */ @Test - public void _ISO88591_UTF8_ISO88591__BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, TestCharset.UTF8, null, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_UTF8_ISO88591_UTF8_() throws Exception { charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null); } @@ -526,8 +408,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "أهلاً", - IE = "أهلاً") + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) public void _ISO88591_UTF8_ISO88591_UTF8_BOMUTF8() throws Exception { charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_8); } @@ -536,8 +419,7 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {}, - IE = "أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_UTF8_ISO88591_UTF8_BOMUTF16BE() throws Exception { charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_16BE); } @@ -546,7 +428,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") + @Alerts({"a", "ä", "?????", "???", "??"}) public void _ISO88591_UTF8_ISO88591_ISO88591_() throws Exception { charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null); } @@ -555,17 +437,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void _ISO88591_UTF8_ISO88591_ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = {}, - IE = "?????") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_UTF8_ISO88591_ISO88591_BOMUTF16BE() throws Exception { charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_16BE); } @@ -574,7 +446,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_ISO88591___() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, null, null, null); } @@ -583,15 +455,7 @@ * @throws Exception if the test fails */ @Test - public void _ISO88591_ISO88591___BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, TestCharset.ISO88591, null, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_ISO88591__UTF8_() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, null, TestCharset.UTF8, null); } @@ -600,15 +464,7 @@ * @throws Exception if the test fails */ @Test - public void _ISO88591_ISO88591__UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, TestCharset.ISO88591, null, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") + @Alerts({"a", "ä", "?????", "???", "??"}) public void _ISO88591_ISO88591__ISO88591_() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, null, TestCharset.ISO88591, null); } @@ -617,25 +473,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void _ISO88591_ISO88591__ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.ISO88591, TestCharset.ISO88591, null, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _ISO88591_ISO88591__ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, TestCharset.ISO88591, null, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = {}, - IE = "أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_ISO88591_UTF8__BOMUTF16BE() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_16BE); } @@ -644,8 +482,7 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {}, - IE = "أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_ISO88591_UTF8_UTF8_BOMUTF16BE() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, BOM_UTF_16BE); } @@ -654,7 +491,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") + @Alerts({"a", "�", "?????", "???", "??"}) public void _ISO88591_ISO88591_UTF8_ISO88591_() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null); } @@ -663,17 +500,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void _ISO88591_ISO88591_UTF8_ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = {}, - IE = "?????") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_ISO88591_UTF8_ISO88591_BOMUTF16BE() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_16BE); } @@ -682,7 +509,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_ISO88591_ISO88591__() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, null); } @@ -691,8 +518,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "أهلاً", - IE = "أهلاً") + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) public void _ISO88591_ISO88591_ISO88591__BOMUTF8() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_8); } @@ -701,15 +529,7 @@ * @throws Exception if the test fails */ @Test - public void _ISO88591_ISO88591_ISO88591__BOMUTF16BE() throws Exception { - charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_ISO88591_ISO88591_UTF8_() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null); } @@ -718,8 +538,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "أهلاً", - IE = "أهلاً") + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) public void _ISO88591_ISO88591_ISO88591_UTF8_BOMUTF8() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_8); } @@ -728,8 +549,7 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {}, - IE = "أهلاً") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_ISO88591_ISO88591_UTF8_BOMUTF16BE() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_16BE); } @@ -738,7 +558,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") + @Alerts({"a", "ä", "?????", "???", "??"}) public void _ISO88591_ISO88591_ISO88591_ISO88591_() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null); } @@ -747,17 +567,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void _ISO88591_ISO88591_ISO88591_ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = {}, - IE = "?????") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _ISO88591_ISO88591_ISO88591_ISO88591_BOMUTF16BE() throws Exception { charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_16BE); } @@ -766,7 +576,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") + @Alerts({"a", "ä", "?????", "???", "??"}) public void _UTF8_ISO88591_ISO88591_ISO88591_() throws Exception { charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null); } @@ -775,24 +585,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8_ISO88591_ISO88591_ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") - public void _UTF8_ISO88591_ISO88591_ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _UTF8_ISO88591_ISO88591_UTF8_() throws Exception { charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null); } @@ -801,15 +594,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8_ISO88591_ISO88591_UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _UTF8_ISO88591_ISO88591__() throws Exception { charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, null); } @@ -818,15 +603,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8_ISO88591_ISO88591__BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") + @Alerts({"a", "�", "?????", "???", "??"}) public void _UTF8_ISO88591_UTF8_ISO88591_() throws Exception { charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null); } @@ -835,40 +612,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8_ISO88591_UTF8_ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") - public void _UTF8_ISO88591_UTF8_ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _UTF8_ISO88591_UTF8_UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _UTF8_ISO88591_UTF8__BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") + @Alerts({"a", "ä", "?????", "???", "??"}) public void _UTF8_ISO88591__ISO88591_() throws Exception { charset(TestCharset.UTF8, TestCharset.ISO88591, null, TestCharset.ISO88591, null); } @@ -877,24 +621,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8_ISO88591__ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.ISO88591, null, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") - public void _UTF8_ISO88591__ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.UTF8, TestCharset.ISO88591, null, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _UTF8_ISO88591__UTF8_() throws Exception { charset(TestCharset.UTF8, TestCharset.ISO88591, null, TestCharset.UTF8, null); } @@ -903,15 +630,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8_ISO88591__UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.ISO88591, null, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _UTF8_ISO88591___() throws Exception { charset(TestCharset.UTF8, TestCharset.ISO88591, null, null, null); } @@ -920,15 +639,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8_ISO88591___BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.ISO88591, null, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") + @Alerts({"a", "ä", "?????", "???", "??"}) public void _UTF8_UTF8_ISO88591_ISO88591_() throws Exception { charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null); } @@ -937,24 +648,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8_UTF8_ISO88591_ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") - public void _UTF8_UTF8_ISO88591_ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _UTF8_UTF8_ISO88591_UTF8_() throws Exception { charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null); } @@ -963,15 +657,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8_UTF8_ISO88591_UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _UTF8_UTF8_ISO88591__() throws Exception { charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, null); } @@ -980,15 +666,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8_UTF8_ISO88591__BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") + @Alerts({"a", "�", "?????", "???", "??"}) public void _UTF8_UTF8_UTF8_ISO88591_() throws Exception { charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null); } @@ -997,40 +675,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8_UTF8_UTF8_ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") - public void _UTF8_UTF8_UTF8_ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _UTF8_UTF8_UTF8_UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.UTF8, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _UTF8_UTF8_UTF8__BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.UTF8, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") + @Alerts({"a", "�", "?????", "???", "??"}) public void _UTF8_UTF8__ISO88591_() throws Exception { charset(TestCharset.UTF8, TestCharset.UTF8, null, TestCharset.ISO88591, null); } @@ -1039,31 +684,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8_UTF8__ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.UTF8, null, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") - public void _UTF8_UTF8__ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.UTF8, TestCharset.UTF8, null, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _UTF8_UTF8__UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, TestCharset.UTF8, null, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _UTF8_UTF8___BOMUTF16BE() throws Exception { charset(TestCharset.UTF8, TestCharset.UTF8, null, null, BOM_UTF_8); } @@ -1072,7 +693,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") + @Alerts({"a", "ä", "?????", "???", "??"}) public void _UTF8__ISO88591_ISO88591_() throws Exception { charset(TestCharset.UTF8, null, TestCharset.ISO88591, TestCharset.ISO88591, null); } @@ -1081,24 +702,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8__ISO88591_ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, null, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") - public void _UTF8__ISO88591_ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.UTF8, null, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _UTF8__ISO88591_UTF8_() throws Exception { charset(TestCharset.UTF8, null, TestCharset.ISO88591, TestCharset.UTF8, null); } @@ -1107,15 +711,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8__ISO88591_UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, null, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) public void _UTF8__ISO88591__() throws Exception { charset(TestCharset.UTF8, null, TestCharset.ISO88591, null, null); } @@ -1124,15 +720,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8__ISO88591__BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, null, TestCharset.ISO88591, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") + @Alerts({"a", "�", "?????", "???", "??"}) public void _UTF8__UTF8_ISO88591_() throws Exception { charset(TestCharset.UTF8, null, TestCharset.UTF8, TestCharset.ISO88591, null); } @@ -1141,40 +729,7 @@ * @throws Exception if the test fails */ @Test - public void _UTF8__UTF8_ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, null, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") - public void _UTF8__UTF8_ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.UTF8, null, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _UTF8__UTF8_UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, null, TestCharset.UTF8, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _UTF8__UTF8__BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, null, TestCharset.UTF8, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") + @Alerts({"a", "�", "?????", "???", "??"}) public void _UTF8___ISO88591_() throws Exception { charset(TestCharset.UTF8, null, null, TestCharset.ISO88591, null); } @@ -1183,41 +738,9 @@ * @throws Exception if the test fails */ @Test - public void _UTF8___ISO88591_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, null, null, TestCharset.ISO88591, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("?????") - public void _UTF8___ISO88591_BOMUTF8() throws Exception { - charset(TestCharset.UTF8, null, null, TestCharset.ISO88591, BOM_UTF_8); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _UTF8___UTF8_BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, null, null, TestCharset.UTF8, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - public void _UTF8____BOMUTF16BE() throws Exception { - charset(TestCharset.UTF8, null, null, null, BOM_UTF_16BE); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "أهلاً", - IE = "\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) public void _UTF8_ISO88591_ISO88591_UTF8_BOMUTF8() throws Exception { charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_8); } @@ -1226,8 +749,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "أهلاً", - IE = "\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) public void _UTF8_ISO88591_ISO88591__BOMUTF8() throws Exception { charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_8); } @@ -1236,8 +760,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "أهلاً", - IE = "\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) public void _UTF8_UTF8_ISO88591_UTF8_BOMUTF8() throws Exception { charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_8); } @@ -1246,8 +771,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "أهلاً", - IE = "\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) public void _UTF8_UTF8_ISO88591__BOMUTF8() throws Exception { charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, BOM_UTF_8); } @@ -1256,8 +782,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "أهلاً", - IE = "\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) public void _UTF8__ISO88591_UTF8_BOMUTF8() throws Exception { charset(TestCharset.UTF8, null, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_8); } @@ -1266,8 +793,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "أهلاً", - IE = "\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) public void _UTF8__ISO88591__BOMUTF8() throws Exception { charset(TestCharset.UTF8, null, TestCharset.ISO88591, null, BOM_UTF_8); } @@ -1276,7 +804,7 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") + @Alerts({"a", "ä", "?????", "???", "??"}) public void __ISO88591_ISO88591_ISO88591_() throws Exception { charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null); } @@ -1285,8 +813,9 @@ * @throws Exception if the test fails */ @Test - public void __ISO88591_ISO88591_ISO88591_BOMUTF16BE() throws Exception { - charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_16BE); + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) + public void __ISO88591_ISO88591_UTF8_() throws Exception { + charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null); } /** @@ -1293,9 +822,9 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void __ISO88591_ISO88591_ISO88591_BOMUTF8() throws Exception { - charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_8); + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) + public void __ISO88591_ISO88591__() throws Exception { + charset(null, TestCharset.ISO88591, TestCharset.ISO88591, null, null); } /** @@ -1302,9 +831,9 @@ * @throws Exception if the test fails */ @Test - @Alerts("\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") - public void __ISO88591_ISO88591_UTF8_() throws Exception { - charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null); + @Alerts({"a", "�", "?????", "???", "??"}) + public void __ISO88591_UTF8_ISO88591_() throws Exception { + charset(null, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null); } /** @@ -1311,8 +840,9 @@ * @throws Exception if the test fails */ @Test - public void __ISO88591_ISO88591_UTF8_BOMUTF16BE() throws Exception { - charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_16BE); + @Alerts({"a", "ä", "?????", "???", "??"}) + public void __ISO88591__ISO88591_() throws Exception { + charset(null, TestCharset.ISO88591, null, TestCharset.ISO88591, null); } /** @@ -1319,9 +849,9 @@ * @throws Exception if the test fails */ @Test - @Alerts("\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") - public void __ISO88591_ISO88591__() throws Exception { - charset(null, TestCharset.ISO88591, TestCharset.ISO88591, null, null); + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) + public void __ISO88591__UTF8_() throws Exception { + charset(null, TestCharset.ISO88591, null, TestCharset.UTF8, null); } /** @@ -1328,8 +858,9 @@ * @throws Exception if the test fails */ @Test - public void __ISO88591_ISO88591__BOMUTF16BE() throws Exception { - charset(null, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_16BE); + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) + public void __ISO88591___() throws Exception { + charset(null, TestCharset.ISO88591, null, null, null); } /** @@ -1336,17 +867,26 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void __ISO88591_UTF8_ISO88591_() throws Exception { - charset(null, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null); + @Alerts({"a", "ä", "?????", "???", "??"}) + public void __UTF8_ISO88591_ISO88591_() throws Exception { + charset(null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null); } + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) + public void __UTF8_ISO88591_UTF8_() throws Exception { + charset(null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null); + } /** * @throws Exception if the test fails */ @Test - public void __ISO88591_UTF8_ISO88591_BOMUTF16BE() throws Exception { - charset(null, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_16BE); + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) + public void __UTF8_ISO88591__() throws Exception { + charset(null, TestCharset.UTF8, TestCharset.ISO88591, null, null); } /** @@ -1353,9 +893,9 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void __ISO88591_UTF8_ISO88591_BOMUTF8() throws Exception { - charset(null, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, BOM_UTF_8); + @Alerts({"a", "�", "?????", "???", "??"}) + public void __UTF8_UTF8_ISO88591_() throws Exception { + charset(null, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null); } /** @@ -1362,8 +902,9 @@ * @throws Exception if the test fails */ @Test - public void __ISO88591_UTF8_UTF8_BOMUTF16BE() throws Exception { - charset(null, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, BOM_UTF_16BE); + @Alerts({"a", "�", "?????", "???", "??"}) + public void __UTF8__ISO88591_() throws Exception { + charset(null, TestCharset.UTF8, null, TestCharset.ISO88591, null); } /** @@ -1370,8 +911,9 @@ * @throws Exception if the test fails */ @Test - public void __ISO88591_UTF8__BOMUTF16BE() throws Exception { - charset(null, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_16BE); + @Alerts({"a", "ä", "?????", "???", "??"}) + public void ___ISO88591_ISO88591_() throws Exception { + charset(null, null, TestCharset.ISO88591, TestCharset.ISO88591, null); } /** @@ -1378,9 +920,9 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void __ISO88591__ISO88591_() throws Exception { - charset(null, TestCharset.ISO88591, null, TestCharset.ISO88591, null); + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) + public void ___ISO88591_UTF8_() throws Exception { + charset(null, null, TestCharset.ISO88591, TestCharset.UTF8, null); } /** @@ -1387,8 +929,9 @@ * @throws Exception if the test fails */ @Test - public void __ISO88591__ISO88591_BOMUTF16BE() throws Exception { - charset(null, TestCharset.ISO88591, null, TestCharset.ISO88591, BOM_UTF_16BE); + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) + public void ___ISO88591__() throws Exception { + charset(null, null, TestCharset.ISO88591, null, null); } /** @@ -1395,9 +938,9 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void __ISO88591__ISO88591_BOMUTF8() throws Exception { - charset(null, TestCharset.ISO88591, null, TestCharset.ISO88591, BOM_UTF_8); + @Alerts({"a", "ä", "?????", "???", "??"}) + public void ___UTF8_ISO88591_() throws Exception { + charset(null, null, null, TestCharset.ISO88591, null); } /** @@ -1404,9 +947,9 @@ * @throws Exception if the test fails */ @Test - @Alerts("\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") - public void __ISO88591__UTF8_() throws Exception { - charset(null, TestCharset.ISO88591, null, TestCharset.UTF8, null); + @Alerts({"a", "ä", "?????", "???", "??"}) + public void ____ISO88591_() throws Exception { + charset(null, null, null, TestCharset.ISO88591, null); } /** @@ -1413,8 +956,9 @@ * @throws Exception if the test fails */ @Test - public void __ISO88591__UTF8_BOMUTF16BE() throws Exception { - charset(null, TestCharset.ISO88591, null, TestCharset.UTF8, BOM_UTF_16BE); + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) + public void ____UTF8_() throws Exception { + charset(null, null, null, TestCharset.UTF8, null); } /** @@ -1421,9 +965,9 @@ * @throws Exception if the test fails */ @Test - @Alerts("\u00D8\u00A3\u00D9\u2021\u00D9\u201E\u00D8\u00A7\u00D9\u2039") - public void __ISO88591___() throws Exception { - charset(null, TestCharset.ISO88591, null, null, null); + @Alerts({"a", "ä", "أهلاً", "мир", "房间"}) + public void _____() throws Exception { + charset(null, null, null, null, null); } /** @@ -1430,8 +974,11 @@ * @throws Exception if the test fails */ @Test - public void __ISO88591___BOMUTF16BE() throws Exception { - charset(null, TestCharset.ISO88591, null, null, BOM_UTF_16BE); + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) + public void __ISO88591_ISO88591_UTF8_BOMUTF8() throws Exception { + charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_8); } /** @@ -1438,9 +985,11 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void __UTF8_ISO88591_ISO88591_() throws Exception { - charset(null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null); + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) + public void __ISO88591_ISO88591__BOMUTF8() throws Exception { + charset(null, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_8); } /** @@ -1447,8 +996,11 @@ * @throws Exception if the test fails */ @Test - public void __UTF8_ISO88591_ISO88591_BOMUTF16BE() throws Exception { - charset(null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_16BE); + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) + public void __UTF8_ISO88591_UTF8_BOMUTF8() throws Exception { + charset(null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, BOM_UTF_8); } /** @@ -1455,9 +1007,11 @@ * @throws Exception if the test fails */ @Test - @Alerts("?????") - public void __UTF8_ISO88591_ISO88591_BOMUTF8() throws Exception { - charset(null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, BOM_UTF_8); + @Alerts(DEFAULT = {"a", "ä", "أهلاً", "мир", "房间"}, + IE = {"a", "ä", "أهلاً", "мир", "房间"}) + @NotYetImplemented(IE) + public void __UTF8_ISO88591__BOMUTF8() throws Exception { + charset(null, TestCharset.UTF8, TestCharset.ISO88591, null, BOM_UTF_8); } /** @@ -1464,9 +1018,11 @@ * @throw... [truncated message content] |