aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/sputnik_converted/15_Native/15.1_The_Global_Object/15.1.3_URI_Handling_Function_Properties/15.1.3.1_decodeURI/S15.1.3.1_A3_T1.js
blob: 45d03eccc6c9445818326a56b9d4ed154a4026f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * @name: S15.1.3.1_A3_T1;
 * @section: 15.1.3.1;
 * @assertion: Let reservedURISet be a string containing one instance of each character valid 
 * in uriReserved plus "#";
 * @description: Checking all character in reservedURISet. HexDigit in [0..9, A..F];
*/


// Converted for Test262 from original Sputnik source

ES5Harness.registerTest( {
id: "S15.1.3.1_A3_T1",

path: "TestCases/15_Native/15.1_The_Global_Object/15.1.3_URI_Handling_Function_Properties/15.1.3.1_decodeURI/S15.1.3.1_A3_T1.js",

assertion: "Let reservedURISet be a string containing one instance of each character valid",

description: "Checking all character in reservedURISet. HexDigit in [0..9, A..F]",

test: function testcase() {
   //CHECK#1
if (decodeURI("%3B") !== "%3B") {
  $ERROR('#1: decodeURI("%3B") equal "%3B", not ";"');
}

//CHECK#2
if (decodeURI("%2F") !== "%2F") {
  $ERROR('#2: decodeURI("%2F") equal "%2F", not "/"');
}

//CHECK#3
if (decodeURI("%3F") !== "%3F") {
  $ERROR('#3: decodeURI("%3F") equal "%3F", not "?"');
}

//CHECK#4
if (decodeURI("%3A") !== "%3A") {
  $ERROR('#4: decodeURI("%3A") equal "%3A", not ":"');
}

//CHECK#5
if (decodeURI("%40") !== "%40") {
  $ERROR('#5: decodeURI("%40") equal "%40", not "@"');
}

//CHECK#6
if (decodeURI("%26") !== "%26") {
  $ERROR('#6: decodeURI("%26") equal "%26", not "&"');
}

//CHECK#7
if (decodeURI("%3D") !== "%3D") {
  $ERROR('#7.1: decodeURI("%3D") equal "%3D", not "="');
}

//CHECK#8
if (decodeURI("%2B") !== "%2B") {
  $ERROR('#8.1: decodeURI("%2B") equal "%2B", not "+"');
}

//CHECK#9
if (decodeURI("%24") !== "%24") {
  $ERROR('#9: decodeURI("%24") equal "%24", not "$"');
}

//CHECK#10
if (decodeURI("%2C") !== "%2C") {
  $ERROR('#10: decodeURI("%2C") equal "%2C", not ","');
}

//CHECK#11
if (decodeURI("%23") !== "%23") {
  $ERROR('#11: decodeURI("%23") equal "%23", not "#"');
}

 }
});