gecko-dev/dom/encoding/test/unit/test_gbk.js

10 строки
294 KiB
JavaScript
Исходник Обычный вид История

test(
function () {
var bytes = [129,64,129,65,129,66,129,67,129,68,129,69,129,70,129,71,129,72,129,73,129,74,129,75,129,76,129,77,129,78,129,79,129,80,129,81,129,82,129,83,129,84,129,85,129,86,129,87,129,88,129,89,129,90,129,91,129,92,129,93,129,94,129,95,129,96,129,97,129,98,129,99,129,100,129,101,129,102,129,103,129,104,129,105,129,106,129,107,129,108,129,109,129,110,129,111,129,112,129,113,129,114,129,115,129,116,129,117,129,118,129,119,129,120,129,121,129,122,129,123,129,124,129,125,129,126,129,128,129,129,129,130,129,131,129,132,129,133,129,134,129,135,129,136,129,137,129,138,129,139,129,140,129,141,129,142,129,143,129,144,129,145,129,146,129,147,129,148,129,149,129,150,129,151,129,152,129,153,129,154,129,155,129,156,129,157,129,158,129,159,129,160,129,161,129,162,129,163,129,164,129,165,129,166,129,167,129,168,129,169,129,170,129,171,129,172,129,173,129,174,129,175,129,176,129,177,129,178,129,179,129,180,129,181,129,182,129,183,129,184,129,185,129,186,129,187,129,188,129,189,129,190,129,191,129,192,129,193,129,194,129,195,129,196,129,197,129,198,129,199,129,200,129,201,129,202,129,203,129,204,129,205,129,206,129,207,129,208,129,209,129,210,129,211,129,212,129,213,129,214,129,215,129,216,129,217,129,218,129,219,129,220,129,221,129,222,129,223,129,224,129,225,129,226,129,227,129,228,129,229,129,230,129,231,129,232,129,233,129,234,129,235,129,236,129,237,129,238,129,239,129,240,129,241,129,242,129,243,129,244,129,245,129,246,129,247,129,248,129,249,129,250,129,251,129,252,129,253,129,254,130,64,130,65,130,66,130,67,130,68,130,69,130,70,130,71,130,72,130,73,130,74,130,75,130,76,130,77,130,78,130,79,130,80,130,81,130,82,130,83,130,84,130,85,130,86,130,87,130,88,130,89,130,90,130,91,130,92,130,93,130,94,130,95,130,96,130,97,130,98,130,99,130,100,130,101,130,102,130,103,130,104,130,105,130,106,130,107,130,108,130,109,130,110,130,111,130,112,130,113,130,114,130,115,130,116,130,117,130,118,130,119,130,120,130,121,130,122,130,123,130,124,130,125,130,126,130,128,130,129,130,130,130,131,130,132,130,133,130,134,130,135,130,136,130,137,130,138,130,139,130,140,130,141,130,142,130,143,130,144,130,145,130,146,130,147,130,148,130,149,130,150,130,151,130,152,130,153,130,154,130,155,130,156,130,157,130,158,130,159,130,160,130,161,130,162,130,163,130,164,130,165,130,166,130,167,130,168,130,169,130,170,130,171,130,172,130,173,130,174,130,175,130,176,130,177,130,178,130,179,130,180,130,181,130,182,130,183,130,184,130,185,130,186,130,187,130,188,130,189,130,190,130,191,130,192,130,193,130,194,130,195,130,196,130,197,130,198,130,199,130,200,130,201,130,202,130,203,130,204,130,205,130,206,130,207,130,208,130,209,130,210,130,211,130,212,130,213,130,214,130,215,130,216,130,217,130,218,130,219,130,220,130,221,130,222,130,223,130,224,130,225,130,226,130,227,130,228,130,229,130,230,130,231,130,232,130,233,130,234,130,235,130,236,130,237,130,238,130,239,130,240,130,241,130,242,130,243,130,244,130,245,130,246,130,247,130,248,130,249,130,250,130,251,130,252,130,253,130,254,131,64,131,65,131,66,131,67,131,68,131,69,131,70,131,71,131,72,131,73,131,74,131,75,131,76,131,77,131,78,131,79,131,80,131,81,131,82,131,83,131,84,131,85,131,86,131,87,131,88,131,89,131,90,131,91,131,92,131,93,131,94,131,95,131,96,131,97,131,98,131,99,131,100,131,101,131,102,131,103,131,104,131,105,131,106,131,107,131,108,131,109,131,110,131,111,131,112,131,113,131,114,131,115,131,116,131,117,131,118,131,119,131,120,131,121,131,122,131,123,131,124,131,125,131,126,131,128,131,129,131,130,131,131,131,132,131,133,131,134,131,135,131,136,131,137,131,138,131,139,131,140,131,141,131,142,131,143,131,144,131,145,131,146,131,147,131,148,131,149,131,150,131,151,131,152,131,153,131,154,131,155,131,156,131,157,131,158,131,159,131,160,131,161,131,162,131,163,131,164,131,165,131,166,131,167,131,168,131,169,131,170,131,171,131,172,131,173,131,174,131,175,131,176,131,177,131,178,131,179,131,180,131,181,131,182,131,183,131,184,131,185,131,186,131,187,131,188,131,189,131,190,131,191,131,192,131,193,131,194,131,195,131,196,131,197,131,198,131,199,131,200,131,201,131,202,131,203,131,204,131,205,131,206,131,207,13
var string = "\u4E02\u4E04\u4E05\u4E06\u4E0F\u4E12\u4E17\u4E1F\u4E20\u4E21\u4E23\u4E26\u4E29\u4E2E\u4E2F\u4E31\u4E33\u4E35\u4E37\u4E3C\u4E40\u4E41\u4E42\u4E44\u4E46\u4E4A\u4E51\u4E55\u4E57\u4E5A\u4E5B\u4E62\u4E63\u4E64\u4E65\u4E67\u4E68\u4E6A\u4E6B\u4E6C\u4E6D\u4E6E\u4E6F\u4E72\u4E74\u4E75\u4E76\u4E77\u4E78\u4E79\u4E7A\u4E7B\u4E7C\u4E7D\u4E7F\u4E80\u4E81\u4E82\u4E83\u4E84\u4E85\u4E87\u4E8A\u4E90\u4E96\u4E97\u4E99\u4E9C\u4E9D\u4E9E\u4EA3\u4EAA\u4EAF\u4EB0\u4EB1\u4EB4\u4EB6\u4EB7\u4EB8\u4EB9\u4EBC\u4EBD\u4EBE\u4EC8\u4ECC\u4ECF\u4ED0\u4ED2\u4EDA\u4EDB\u4EDC\u4EE0\u4EE2\u4EE6\u4EE7\u4EE9\u4EED\u4EEE\u4EEF\u4EF1\u4EF4\u4EF8\u4EF9\u4EFA\u4EFC\u4EFE\u4F00\u4F02\u4F03\u4F04\u4F05\u4F06\u4F07\u4F08\u4F0B\u4F0C\u4F12\u4F13\u4F14\u4F15\u4F16\u4F1C\u4F1D\u4F21\u4F23\u4F28\u4F29\u4F2C\u4F2D\u4F2E\u4F31\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E\u4F3F\u4F40\u4F41\u4F42\u4F44\u4F45\u4F47\u4F48\u4F49\u4F4A\u4F4B\u4F4C\u4F52\u4F54\u4F56\u4F61\u4F62\u4F66\u4F68\u4F6A\u4F6B\u4F6D\u4F6E\u4F71\u4F72\u4F75\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F80\u4F81\u4F82\u4F85\u4F86\u4F87\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F95\u4F96\u4F98\u4F99\u4F9A\u4F9C\u4F9E\u4F9F\u4FA1\u4FA2\u4FA4\u4FAB\u4FAD\u4FB0\u4FB1\u4FB2\u4FB3\u4FB4\u4FB6\u4FB7\u4FB8\u4FB9\u4FBA\u4FBB\u4FBC\u4FBD\u4FBE\u4FC0\u4FC1\u4FC2\u4FC6\u4FC7\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FD2\u4FD3\u4FD4\u4FD5\u4FD6\u4FD9\u4FDB\u4FE0\u4FE2\u4FE4\u4FE5\u4FE7\u4FEB\u4FEC\u4FF0\u4FF2\u4FF4\u4FF5\u4FF6\u4FF7\u4FF9\u4FFB\u4FFC\u4FFD\u4FFF\u5000\u5001\u5002\u5003\u5004\u5005\u5006\u5007\u5008\u5009\u500A\u500B\u500E\u5010\u5011\u5013\u5015\u5016\u5017\u501B\u501D\u501E\u5020\u5022\u5023\u5024\u5027\u502B\u502F\u5030\u5031\u5032\u5033\u5034\u5035\u5036\u5037\u5038\u5039\u503B\u503D\u503F\u5040\u5041\u5042\u5044\u5045\u5046\u5049\u504A\u504B\u504D\u5050\u5051\u5052\u5053\u5054\u5056\u5057\u5058\u5059\u505B\u505D\u505E\u505F\u5060\u5061\u5062\u5063\u5064\u5066\u5067\u5068\u5069\u506A\u506B\u506D\u506E\u506F\u5070\u5071\u5072\u5073\u5074\u5075\u5078\u5079\u507A\u507C\u507D\u5081\u5082\u5083\u5084\u5086\u5087\u5089\u508A\u508B\u508C\u508E\u508F\u5090\u5091\u5092\u5093\u5094\u5095\u5096\u5097\u5098\u5099\u509A\u509B\u509C\u509D\u509E\u509F\u50A0\u50A1\u50A2\u50A4\u50A6\u50AA\u50AB\u50AD\u50AE\u50AF\u50B0\u50B1\u50B3\u50B4\u50B5\u50B6\u50B7\u50B8\u50B9\u50BC\u50BD\u50BE\u50BF\u50C0\u50C1\u50C2\u50C3\u50C4\u50C5\u50C6\u50C7\u50C8\u50C9\u50CA\u50CB\u50CC\u50CD\u50CE\u50D0\u50D1\u50D2\u50D3\u50D4\u50D5\u50D7\u50D8\u50D9\u50DB\u50DC\u50DD\u50DE\u50DF\u50E0\u50E1\u50E2\u50E3\u50E4\u50E5\u50E8\u50E9\u50EA\u50EB\u50EF\u50F0\u50F1\u50F2\u50F4\u50F6\u50F7\u50F8\u50F9\u50FA\u50FC\u50FD\u50FE\u50FF\u5100\u5101\u5102\u5103\u5104\u5105\u5108\u5109\u510A\u510C\u510D\u510E\u510F\u5110\u5111\u5113\u5114\u5115\u5116\u5117\u5118\u5119\u511A\u511B\u511C\u511D\u511E\u511F\u5120\u5122\u5123\u5124\u5125\u5126\u5127\u5128\u5129\u512A\u512B\u512C\u512D\u512E\u512F\u5130\u5131\u5132\u5133\u5134\u5135\u5136\u5137\u5138\u5139\u513A\u513B\u513C\u513D\u513E\u5142\u5147\u514A\u514C\u514E\u514F\u5150\u5152\u5153\u5157\u5158\u5159\u515B\u515D\u515E\u515F\u5160\u5161\u5163\u5164\u5166\u5167\u5169\u516A\u516F\u5172\u517A\u517E\u517F\u5183\u5184\u5186\u5187\u518A\u518B\u518E\u518F\u5190\u5191\u5193\u5194\u5198\u519A\u519D\u519E\u519F\u51A1\u51A3\u51A6\u51A7\u51A8\u51A9\u51AA\u51AD\u51AE\u51B4\u51B8\u51B9\u51BA\u51BE\u51BF\u51C1\u51C2\u51C3\u51C5\u51C8\u51CA\u51CD\u51CE\u51D0\u51D2\u51D3\u51D4\u51D5\u51D6\u51D7\u51D8\u51D9\u51DA\u51DC\u51DE\u51DF\u51E2\u51E3\u51E5\u51E6\u51E7\u51E8\u51E9\u51EA\u51EC\u51EE\u51F1\u51F2\u51F4\u51F7\u51FE\u5204\u5205\u5209\u520B\u520C\u520F\u5210\u5213\u5214\u5215\u521C\u521E\u521F\u5221\u5222\u5223\u5225\u5226\u5227\u522A\u522C\u522F\u5231\u5232\u5234\u5235\u523C\u523E\u5244\u5245\u5246\u5247\u5248\u5249\u524B\u524E\u524F\u5252\u5253\u5255\u5257\u5258\u5259\u525A\u525B\u525D\u525F\u5260\u5262\u5263\u5264\u5266\u5268\u526B\u526C\u526D\u526E\u5270\u5271\u5273\u5274\u5275\u5276\u5277\u5278\u5279\u527A\u527B\u527C\u527E\u5280\u5283\u5284\u5285\u5286\u5287\u5289\u528A\u528B\u528C\u528D\u528E\u528F\u5291\u5292\u5294\u5295\u5296\u5
assert_equals(new TextDecoder("gbk").decode(new Uint8Array(bytes)), string, "decoded");
},
"gbk"
);