gecko/dom/encoding/test/unit/test_big5.js

10 lines
181 KiB
JavaScript
Raw Normal View History

test(
function () {
var bytes = [161,64,161,65,161,66,161,67,161,68,161,70,161,71,161,72,161,73,161,74,161,75,161,76,161,77,161,79,161,80,161,81,161,82,161,83,161,84,161,85,161,86,161,87,161,88,161,89,161,90,161,91,161,92,161,93,161,94,161,95,161,96,161,97,161,98,161,99,161,100,161,101,161,102,161,103,161,104,161,105,161,106,161,107,161,108,161,109,161,110,161,111,161,112,161,113,161,114,161,115,161,116,161,117,161,118,161,119,161,120,161,121,161,122,161,123,161,124,161,125,161,126,161,161,161,162,161,163,161,164,161,165,161,166,161,167,161,168,161,169,161,170,161,171,161,172,161,173,161,174,161,175,161,176,161,177,161,178,161,179,161,180,161,181,161,182,161,183,161,184,161,185,161,186,161,187,161,188,161,189,161,190,161,191,161,192,161,193,161,195,161,196,161,197,161,198,161,199,161,200,161,201,161,202,161,203,161,204,161,205,161,206,161,207,161,208,161,209,161,210,161,211,161,212,161,213,161,214,161,215,161,216,161,217,161,218,161,219,161,220,161,221,161,222,161,223,161,224,161,225,161,226,161,228,161,229,161,230,161,231,161,232,161,233,161,234,161,235,161,236,161,237,161,238,161,239,161,240,161,241,161,244,161,245,161,246,161,247,161,248,161,249,161,250,161,251,161,252,161,253,162,67,162,69,162,72,162,73,162,74,162,75,162,76,162,77,162,78,162,79,162,80,162,81,162,82,162,83,162,84,162,85,162,86,162,87,162,88,162,93,162,94,162,95,162,96,162,98,162,99,162,100,162,101,162,102,162,103,162,104,162,105,162,106,162,107,162,108,162,109,162,110,162,111,162,112,162,113,162,114,162,115,162,116,162,117,162,118,162,119,162,120,162,121,162,122,162,123,162,124,162,125,162,126,162,161,162,162,162,163,162,164,162,165,162,166,162,167,162,168,162,169,162,170,162,171,162,172,162,173,162,174,162,175,162,176,162,177,162,178,162,179,162,180,162,181,162,182,162,183,162,184,162,185,162,186,162,187,162,188,162,189,162,190,162,191,162,192,162,193,162,194,162,195,162,196,162,197,162,198,162,199,162,200,162,201,162,202,162,203,162,205,162,207,162,208,162,209,162,210,162,211,162,212,162,213,162,214,162,215,162,216,162,217,162,218,162,219,162,220,162,221,162,222,162,223,162,224,162,225,162,226,162,227,162,228,162,229,162,230,162,231,162,232,162,233,162,234,162,235,162,236,162,237,162,238,162,239,162,240,162,241,162,242,162,243,162,244,162,245,162,246,162,247,162,248,162,249,162,250,162,251,162,252,162,253,162,254,163,64,163,65,163,66,163,67,163,68,163,69,163,70,163,71,163,72,163,73,163,74,163,75,163,76,163,77,163,78,163,79,163,80,163,81,163,82,163,83,163,84,163,85,163,86,163,87,163,88,163,89,163,90,163,91,163,92,163,93,163,94,163,95,163,96,163,97,163,98,163,99,163,100,163,101,163,102,163,103,163,104,163,105,163,106,163,107,163,108,163,109,163,110,163,111,163,112,163,113,163,114,163,115,163,116,163,117,163,118,163,119,163,120,163,121,163,122,163,123,163,124,163,125,163,126,163,161,163,162,163,163,163,164,163,165,163,166,163,167,163,168,163,169,163,170,163,171,163,172,163,173,163,174,163,175,163,176,163,177,163,178,163,179,163,180,163,181,163,182,163,183,163,184,163,185,163,186,163,187,163,188,163,189,163,190,163,191,164,64,164,65,164,66,164,67,164,68,164,69,164,70,164,71,164,72,164,73,164,74,164,75,164,76,164,77,164,78,164,79,164,80,164,82,164,83,164,84,164,85,164,86,164,87,164,88,164,89,164,90,164,91,164,92,164,93,164,94,164,95,164,96,164,97,164,98,164,99,164,100,164,101,164,102,164,103,164,104,164,105,164,106,164,107,164,108,164,109,164,110,164,111,164,112,164,113,164,114,164,115,164,116,164,117,164,118,164,119,164,120,164,121,164,122,164,123,164,124,164,125,164,126,164,161,164,162,164,163,164,164,164,165,164,166,164,167,164,168,164,169,164,170,164,171,164,172,164,173,164,174,164,175,164,176,164,177,164,178,164,179,164,180,164,181,164,182,164,183,164,184,164,185,164,186,164,187,164,188,164,189,164,190,164,191,164,192,164,193,164,194,164,195,164,196,164,197,164,198,164,199,164,200,164,201,164,203,164,204,164,205,164,206,164,207,164,208,164,209,164,210,164,211,164,212,164,213,164,214,164,215,164,216,164,217,164,218,164,219,164,220,164,221,164,222,164,223,164,224,164,225,164,226,164,227,164,228,164,229,164,230,164,231,164,232,164,233,164,234,164,235,164,236,164,237,
var string = "\u3000\uFF0C\u3001\u3002\uFF0E\uFF1B\uFF1A\uFF1F\uFF01\uFE30\u2026\u2025\uFE50\uFE52\u00B7\uFE54\uFE55\uFE56\uFE57\uFF5C\u2013\uFE31\u2014\uFE33\u2574\uFE34\uFE4F\uFF08\uFF09\uFE35\uFE36\uFF5B\uFF5D\uFE37\uFE38\u3014\u3015\uFE39\uFE3A\u3010\u3011\uFE3B\uFE3C\u300A\u300B\uFE3D\uFE3E\u3008\u3009\uFE3F\uFE40\u300C\u300D\uFE41\uFE42\u300E\u300F\uFE43\uFE44\uFE59\uFE5A\uFE5B\uFE5C\uFE5D\uFE5E\u2018\u2019\u201C\u201D\u301D\u301E\u2035\u2032\uFF03\uFF06\uFF0A\u203B\u00A7\u3003\u25CB\u25CF\u25B3\u25B2\u25CE\u2606\u2605\u25C7\u25C6\u25A1\u25A0\u25BD\u25BC\u32A3\u2105\uFFE3\uFF3F\u02CD\uFE49\uFE4A\uFE4D\uFE4E\uFE4B\uFE4C\uFE5F\uFE60\uFE61\uFF0B\uFF0D\u00D7\u00F7\u00B1\u221A\uFF1C\uFF1E\uFF1D\u2266\u2267\u2260\u221E\u2252\u2261\uFE62\uFE63\uFE64\uFE65\uFE66\u2229\u222A\u22A5\u2220\u221F\u22BF\u33D2\u33D1\u222B\u222E\u2235\u2234\u2640\u2642\u2191\u2193\u2190\u2192\u2196\u2197\u2199\u2198\u2225\u2223\uFF04\u3012\uFF05\uFF20\u2103\u2109\uFE69\uFE6A\uFE6B\u33D5\u339C\u339D\u339E\u33CE\u33A1\u338E\u338F\u33C4\u00B0\u5161\u5163\u55E7\u74E9\u2581\u2582\u2583\u2584\u2585\u2586\u2587\u2588\u258F\u258E\u258D\u258C\u258B\u258A\u2589\u253C\u2534\u252C\u2524\u251C\u2594\u2500\u2502\u2595\u250C\u2510\u2514\u2518\u256D\u256E\u2570\u256F\u2550\u255E\u256A\u2561\u25E2\u25E3\u25E5\u25E4\u2571\u2572\u2573\uFF10\uFF11\uFF12\uFF13\uFF14\uFF15\uFF16\uFF17\uFF18\uFF19\u2160\u2161\u2162\u2163\u2164\u2165\u2166\u2167\u2168\u2169\u3021\u3022\u3023\u3024\u3025\u3026\u3027\u3028\u3029\u5344\uFF21\uFF22\uFF23\uFF24\uFF25\uFF26\uFF27\uFF28\uFF29\uFF2A\uFF2B\uFF2C\uFF2D\uFF2E\uFF2F\uFF30\uFF31\uFF32\uFF33\uFF34\uFF35\uFF36\uFF37\uFF38\uFF39\uFF3A\uFF41\uFF42\uFF43\uFF44\uFF45\uFF46\uFF47\uFF48\uFF49\uFF4A\uFF4B\uFF4C\uFF4D\uFF4E\uFF4F\uFF50\uFF51\uFF52\uFF53\uFF54\uFF55\uFF56\uFF57\uFF58\uFF59\uFF5A\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u3105\u3106\u3107\u3108\u3109\u310A\u310B\u310C\u310D\u310E\u310F\u3110\u3111\u3112\u3113\u3114\u3115\u3116\u3117\u3118\u3119\u311A\u311B\u311C\u311D\u311E\u311F\u3120\u3121\u3122\u3123\u3124\u3125\u3126\u3127\u3128\u3129\u02D9\u02C9\u02CA\u02C7\u02CB\u4E00\u4E59\u4E01\u4E03\u4E43\u4E5D\u4E86\u4E8C\u4EBA\u513F\u5165\u516B\u51E0\u5200\u5201\u529B\u5315\u535C\u53C8\u4E09\u4E0B\u4E08\u4E0A\u4E2B\u4E38\u51E1\u4E45\u4E48\u4E5F\u4E5E\u4E8E\u4EA1\u5140\u5203\u52FA\u5343\u53C9\u53E3\u571F\u58EB\u5915\u5927\u5973\u5B50\u5B51\u5B53\u5BF8\u5C0F\u5C22\u5C38\u5C71\u5DDD\u5DE5\u5DF1\u5DF2\u5DF3\u5DFE\u5E72\u5EFE\u5F0B\u5F13\u624D\u4E11\u4E10\u4E0D\u4E2D\u4E30\u4E39\u4E4B\u5C39\u4E88\u4E91\u4E95\u4E92\u4E94\u4EA2\u4EC1\u4EC0\u4EC3\u4EC6\u4EC7\u4ECD\u4ECA\u4ECB\u4EC4\u5143\u5141\u5167\u516D\u516E\u516C\u5197\u51F6\u5206\u5207\u5208\u52FB\u52FE\u52FF\u5316\u5339\u5348\u5347\u535E\u5384\u53CB\u53CA\u53CD\u58EC\u5929\u592B\u592A\u592D\u5B54\u5C11\u5C24\u5C3A\u5C6F\u5DF4\u5E7B\u5EFF\u5F14\u5F15\u5FC3\u6208\u6236\u624B\u624E\u652F\u6587\u6597\u65A4\u65B9\u65E5\u66F0\u6708\u6728\u6B20\u6B62\u6B79\u6BCB\u6BD4\u6BDB\u6C0F\u6C34\u706B\u722A\u7236\u723B\u7247\u7259\u725B\u72AC\u738B\u4E19\u4E16\u4E15\u4E14\u4E18\u4E3B\u4E4D\u4E4F\u4E4E\u4EE5\u4ED8\u4ED4\u4ED5\u4ED6\u4ED7\u4EE3\u4EE4\u4ED9\u4EDE\u5145\u5144\u5189\u518A\u51AC\u51F9\u51FA\u51F8\u520A\u52A0\u529F\u5305\u5306\u5317\u531D\u4EDF\u534A\u5349\u5361\u5360\u536F\u536E\u53BB\u53EF\u53E4\u53F3\u53EC\u53EE\u53E9\u53E8\u53FC\u53F8\u53F5\u53EB\u53E6\u53EA\u53F2\u53F1\u53F0\u53E5\u53ED\u53FB\u56DB\u56DA\u5916\u592E\u5931\u5974\u5976\u5B55\u5B83\u5C3C\u5DE8\u5DE7\u5DE6\u5E02\u5E03\u5E73\u5E7C\u5F01\u5F18\u5F17\u5FC5\u620A\u6253\u6254\u6252\u6251\u65A5\u65E6\u672E\u672C\u672A\u672B\u672D\u6B63\u6BCD\u6C11\u6C10\u6C38\u6C41\u6C40\u6C3E\u72AF\u7384\u7389\u74DC\u74E6\u7518\u751F\u7528\u7529\u7530\u7531\u7532\u7533\u758B\u767D\u76AE\u76BF\u76EE\u77DB\u77E2\u77F3\u793A\u79BE\u7A74\u7ACB\u4E1E\u4E1F\u4E52\u4E53\u4E69\u4E99\u4EA4\u4EA6\u4EA5\u4EFF\u4
assert_equals(new TextDecoder("big5").decode(new Uint8Array(bytes)), string, "decoded");
},
"big5"
);