зеркало из https://github.com/mozilla/pjs.git
Test cases for bug 116882
This commit is contained in:
Родитель
3c31c84259
Коммит
c60e57ec1a
|
@ -0,0 +1,19 @@
|
|||
/* Tests conversion of undefined and illegal sequences from Shift-JIS
|
||||
* to Unicode (bug 116882)
|
||||
*/
|
||||
|
||||
const inText = "\xfd\xfe\xff\x81\x20\x81\x3f\x86\x3c";
|
||||
const expectedText = "\uf8f1\uf8f2\uf8f3\u30fb\u30fb\u30fb";
|
||||
const charset = "Shift_JIS";
|
||||
|
||||
function run_test() {
|
||||
var ScriptableUnicodeConverter =
|
||||
Components.Constructor("@mozilla.org/intl/scriptableunicodeconverter",
|
||||
"nsIScriptableUnicodeConverter");
|
||||
|
||||
var converter = new ScriptableUnicodeConverter();
|
||||
converter.charset = charset;
|
||||
|
||||
var outText = converter.ConvertToUnicode(inText) + converter.Finish();
|
||||
do_check_eq(outText, expectedText);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Shift_JIS illegal sequences</title>
|
||||
<meta HTTP-equiv="content-type" content="text/html; charset=shift_jis">
|
||||
</head>
|
||||
<body>
|
||||
<p>・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Shift_JIS illegal sequences</title>
|
||||
<meta HTTP-equiv="content-type" content="text/html; charset=shift_jis">
|
||||
</head>
|
||||
<body>
|
||||
<p>ýþÿ<EFBFBD> <20>!<21>"<22>#<23>$<24>%<25>&<26>'<27>(<28>)<29>*<2A>+<2B>,<2C>-<2D>.<2E>/<2F>0<EFBFBD>1<EFBFBD>2<EFBFBD>3<EFBFBD>4<EFBFBD>5<EFBFBD>6<EFBFBD>7<EFBFBD>8<EFBFBD>9<EFBFBD>:<3A>;<EFBFBD><<EFBFBD>=<3D>><3E>?†¦</p>
|
||||
</body>
|
||||
</html>
|
|
@ -77,6 +77,7 @@ fails == 25888-3r.html 25888-3r-ref.html # bug 25888
|
|||
== 99850-1d.html 99850-1-ref.html
|
||||
== 105030-1.html 105030-1-ref.html
|
||||
== 109735-1.html 109735-1-ref.html
|
||||
== 116882-1.html 116882-1-ref.html
|
||||
== 120834-1a.html 120834-1-ref.html
|
||||
== 120834-2a.html 120834-2-ref.html
|
||||
== 120834-2b.html 120834-2-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче