diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /js/src/tests/test262/built-ins/decodeURIComponent/S15.1.3.2_A3_T1.js | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/built-ins/decodeURIComponent/S15.1.3.2_A3_T1.js')
-rw-r--r-- | js/src/tests/test262/built-ins/decodeURIComponent/S15.1.3.2_A3_T1.js | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/decodeURIComponent/S15.1.3.2_A3_T1.js b/js/src/tests/test262/built-ins/decodeURIComponent/S15.1.3.2_A3_T1.js new file mode 100644 index 0000000000..5ec1775aa9 --- /dev/null +++ b/js/src/tests/test262/built-ins/decodeURIComponent/S15.1.3.2_A3_T1.js @@ -0,0 +1,67 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Let reservedURIComponentSet be the empty string +esid: sec-decodeuricomponent-encodeduricomponent +description: > + uriReserved and "#" not in reservedURIComponentSet. HexDigit in + [0..9, A..F] +---*/ + +//CHECK#1 +if (decodeURIComponent("%3B") !== ";") { + throw new Test262Error('#1: decodeURIComponent("%3B") equal ";", not "%3B"'); +} + +//CHECK#2 +if (decodeURIComponent("%2F") !== "/") { + throw new Test262Error('#2: decodeURIComponent("%2F") equal "/", not "%2F"'); +} + +//CHECK#3 +if (decodeURIComponent("%3F") !== "?") { + throw new Test262Error('#3: decodeURIComponent("%3F") equal "?", not "%3F"'); +} + +//CHECK#4 +if (decodeURIComponent("%3A") !== ":") { + throw new Test262Error('#4: decodeURIComponent("%3A") equal ":", not "%3A"'); +} + +//CHECK#5 +if (decodeURIComponent("%40") !== "@") { + throw new Test262Error('#5: decodeURIComponent("%40") equal "@", not "%40"'); +} + +//CHECK#6 +if (decodeURIComponent("%26") !== "&") { + throw new Test262Error('#6: decodeURIComponent("%26") equal "&", not "%26"'); +} + +//CHECK#7 +if (decodeURIComponent("%3D") !== "=") { + throw new Test262Error('#7.1: decodeURIComponent("%3D") equal "=", not "%3D"'); +} + +//CHECK#8 +if (decodeURIComponent("%2B") !== "+") { + throw new Test262Error('#8.1: decodeURIComponent("%2B") equal "+", not "%2B"'); +} + +//CHECK#9 +if (decodeURIComponent("%24") !== "$") { + throw new Test262Error('#9: decodeURIComponent("%24") equal "$", not "%24"'); +} + +//CHECK#10 +if (decodeURIComponent("%2C") !== ",") { + throw new Test262Error('#10: decodeURIComponent("%2C") equal ",", not "%2C"'); +} + +//CHECK#11 +if (decodeURIComponent("%23") !== "#") { + throw new Test262Error('#11: decodeURIComponent("%23") equal "#", not "%23"'); +} + +reportCompare(0, 0); |