File: S15.1.3.2_A3_T2.js

package info (click to toggle)
qtdeclarative-opensource-src 5.15.8%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 259,256 kB
  • sloc: javascript: 512,396; cpp: 495,775; xml: 8,892; python: 3,304; ansic: 2,764; sh: 206; makefile: 62; php: 27
file content (67 lines) | stat: -rw-r--r-- 1,755 bytes parent folder | download | duplicates (11)
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
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: Let reservedURIComponentSet be the empty string
es5id: 15.1.3.2_A3_T2
es6id: 18.2.6.3
esid: sec-decodeuricomponent-encodeduricomponent
description: >
    uriReserved and "#" not in reservedURIComponentSet. HexDigit in
    [0..9, a..f]
---*/

//CHECK#1
if (decodeURIComponent("%3b") !== ";") {
  $ERROR('#1: decodeURIComponent("%3b") equal ";", not "%3B" or "%3b"');
}

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

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

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

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

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

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

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

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

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

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