| 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: | |
| 6 |
Let reservedURISet be a string containing one instance of each character valid |
| 7 |
in uriReserved plus "#" |
| 8 |
es5id: 15.1.3.1_A3_T2 |
| 9 |
es6id: 18.2.6.2 |
| 10 |
esid: sec-decodeuri-encodeduri |
| 11 |
description: Checking all character in reservedURISet. HexDigit in [0..9, a..f] |
| 12 |
---*/ |
| 13 |
|
| 14 |
//CHECK#1 |
| 15 |
if (decodeURI("%3b") !== "%3b") { |
| 16 |
$ERROR('#1: decodeURI("%3b") equal "%3b", not ";" or "%3B"'); |
| 17 |
} |
| 18 |
|
| 19 |
//CHECK#2 |
| 20 |
if (decodeURI("%2f") !== "%2f") { |
| 21 |
$ERROR('#2: decodeURI("%2f") equal "%2f", not "/" or "%2F"'); |
| 22 |
} |
| 23 |
|
| 24 |
//CHECK#3 |
| 25 |
if (decodeURI("%3f") !== "%3f") { |
| 26 |
$ERROR('#3: decodeURI("%3f") equal "%3f", not "?" or "%3F"'); |
| 27 |
} |
| 28 |
|
| 29 |
//CHECK#4 |
| 30 |
if (decodeURI("%3a") !== "%3a") { |
| 31 |
$ERROR('#4: decodeURI("%3a") equal "%3a", not ":" or "%3A"'); |
| 32 |
} |
| 33 |
|
| 34 |
//CHECK#5 |
| 35 |
if (decodeURI("%40") !== "%40") { |
| 36 |
$ERROR('#5: decodeURI("%40") equal "%40", not "@"'); |
| 37 |
} |
| 38 |
|
| 39 |
//CHECK#6 |
| 40 |
if (decodeURI("%26") !== "%26") { |
| 41 |
$ERROR('#6: decodeURI("%26") equal "%26", not "&"'); |
| 42 |
} |
| 43 |
|
| 44 |
//CHECK#7 |
| 45 |
if (decodeURI("%3d") !== "%3d") { |
| 46 |
$ERROR('#7.1: decodeURI("%3d") equal "%3d", not "=" or "%3D"'); |
| 47 |
} |
| 48 |
|
| 49 |
//CHECK#8 |
| 50 |
if (decodeURI("%2b") !== "%2b") { |
| 51 |
$ERROR('#8.1: decodeURI("%2b") equal "%2b", not "+" or "%2B"'); |
| 52 |
} |
| 53 |
|
| 54 |
//CHECK#9 |
| 55 |
if (decodeURI("%24") !== "%24") { |
| 56 |
$ERROR('#9: decodeURI("%24") equal "%24", not "$"'); |
| 57 |
} |
| 58 |
|
| 59 |
//CHECK#10 |
| 60 |
if (decodeURI("%2c") !== "%2c") { |
| 61 |
$ERROR('#10: decodeURI("%2c") equal "%2c", not "," or "%2C"'); |
| 62 |
} |
| 63 |
|
| 64 |
//CHECK#11 |
| 65 |
if (decodeURI("%23") !== "%23") { |
| 66 |
$ERROR('#11: decodeURI("%23") equal "%23", not "#"'); |
| 67 |
} |