| 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_T1 |
| 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"'); |
| 17 |
} |
| 18 |
|
| 19 |
//CHECK#2 |
| 20 |
if (decodeURIComponent("%2F") !== "/") { |
| 21 |
$ERROR('#2: decodeURIComponent("%2F") equal "/", not "%2F"'); |
| 22 |
} |
| 23 |
|
| 24 |
//CHECK#3 |
| 25 |
if (decodeURIComponent("%3F") !== "?") { |
| 26 |
$ERROR('#3: decodeURIComponent("%3F") equal "?", not "%3F"'); |
| 27 |
} |
| 28 |
|
| 29 |
//CHECK#4 |
| 30 |
if (decodeURIComponent("%3A") !== ":") { |
| 31 |
$ERROR('#4: decodeURIComponent("%3A") equal ":", not "%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"'); |
| 47 |
} |
| 48 |
|
| 49 |
//CHECK#8 |
| 50 |
if (decodeURIComponent("%2B") !== "+") { |
| 51 |
$ERROR('#8.1: decodeURIComponent("%2B") equal "+", not "%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"'); |
| 62 |
} |
| 63 |
|
| 64 |
//CHECK#11 |
| 65 |
if (decodeURIComponent("%23") !== "#") { |
| 66 |
$ERROR('#11: decodeURIComponent("%23") equal "#", not "%23"'); |
| 67 |
} |