Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/decodeURIComponent/S15.1.3.2_A3_T2.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: Let reservedURIComponentSet be the empty string
6 es5id: 15.1.3.2_A3_T2
7 es6id: 18.2.6.3
8 esid: sec-decodeuricomponent-encodeduricomponent
9 description: >
10 uriReserved and "#" not in reservedURIComponentSet. HexDigit in
11 [0..9, a..f]
12 ---*/
13
14 //CHECK#1
15 if (decodeURIComponent("%3b") !== ";") {
16 $ERROR('#1: decodeURIComponent("%3b") equal ";", not "%3B" or "%3b"');
17 }
18
19 //CHECK#2
20 if (decodeURIComponent("%2f") !== "/") {
21 $ERROR('#2: decodeURIComponent("%2f") equal "/", not "%2F" or "%2f"');
22 }
23
24 //CHECK#3
25 if (decodeURIComponent("%3f") !== "?") {
26 $ERROR('#3: decodeURIComponent("%3f") equal "?", not "%3F" or "%3f"');
27 }
28
29 //CHECK#4
30 if (decodeURIComponent("%3a") !== ":") {
31 $ERROR('#4: decodeURIComponent("%3a") equal ":", not "%3A" or "%3a"');
32 }
33
34 //CHECK#5
35 if (decodeURIComponent("%40") !== "@") {
36 $ERROR('#5: decodeURIComponent("%40") equal "@", not "%40"');
37 }
38
39 //CHECK#6
40 if (decodeURIComponent("%26") !== "&") {
41 $ERROR('#6: decodeURIComponent("%26") equal "&", not "%26"');
42 }
43
44 //CHECK#7
45 if (decodeURIComponent("%3d") !== "=") {
46 $ERROR('#7.1: decodeURIComponent("%3d") equal "=", not "%3D" or "%3d"');
47 }
48
49 //CHECK#8
50 if (decodeURIComponent("%2b") !== "+") {
51 $ERROR('#8.1: decodeURIComponent("%2b") equal "+", not "%2B" or "%2b"');
52 }
53
54 //CHECK#9
55 if (decodeURIComponent("%24") !== "$") {
56 $ERROR('#9: decodeURIComponent("%24") equal "$", not "%24"');
57 }
58
59 //CHECK#10
60 if (decodeURIComponent("%2c") !== ",") {
61 $ERROR('#10: decodeURIComponent("%2c") equal ",", not "%2C" or "%2c"');
62 }
63
64 //CHECK#11
65 if (decodeURIComponent("%23") !== "#") {
66 $ERROR('#11: decodeURIComponent("%23") equal "#", not "%23"');
67 }