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