2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
|
|
|
info: If string.charAt(k) not equal "%", return this char
|
2017-06-29 21:49:38 +02:00
|
|
|
esid: sec-decodeuri-encodeduri
|
2014-07-22 01:09:02 +02:00
|
|
|
description: Complex tests
|
2017-04-18 22:31:31 +02:00
|
|
|
includes: [decimalToHexString.js]
|
2014-07-22 01:09:02 +02:00
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
for (var indexI = 0; indexI <= 65535; indexI++) {
|
|
|
|
if (indexI !== 0x25) {
|
2017-06-29 21:49:49 +02:00
|
|
|
try {
|
2011-09-07 08:35:18 +02:00
|
|
|
var str = String.fromCharCode(indexI);
|
2021-09-01 23:33:23 +02:00
|
|
|
var differs = decodeURI(str) !== str;
|
2018-02-15 21:50:18 +01:00
|
|
|
} catch (e) {
|
2021-09-01 23:33:23 +02:00
|
|
|
throw new Test262Error('#' + decimalToHexString(indexI) + ' throws');
|
|
|
|
}
|
|
|
|
if (differs) {
|
|
|
|
throw new Test262Error('#' + decimalToHexString(indexI) + ' differs');
|
2017-06-29 21:49:49 +02:00
|
|
|
}
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
2017-06-29 21:49:49 +02:00
|
|
|
}
|