Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/encodeURIComponent/S15.1.3.4_A4_T3.js

raw
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: URI tests
6 es5id: 15.1.3.4_A4_T3
7 es6id: 18.2.6.5
8 esid: sec-encodeuricomponent-uricomponent
9 description: Checking URL with Line Terminator
10 ---*/
11
12 //CHECK#1
13 if ((encodeURIComponent("http://unipro.ru/\nabout") !== "http%3A%2F%2Funipro.ru%2F%0Aabout") && encodeURIComponent("http://unipro.ru/\nabout") !== "http%3A%2F%2Funipro.ru%2F%0aabout") {
14 $ERROR('#1: http://unipro.ru/\\nabout');
15 }
16
17 //CHECK#2
18 if ((encodeURIComponent("http://unipro.ru/\vabout") !== "http%3A%2F%2Funipro.ru%2F%0Babout") && encodeURIComponent("http://unipro.ru/\vabout") !== "http%3A%2F%2Funipro.ru%2F%0babout") {
19 $ERROR('#2: http://unipro.ru/\\vabout');
20 }
21
22 //CHECK#3
23 if ((encodeURIComponent("http://unipro.ru/\fabout") !== "http%3A%2F%2Funipro.ru%2F%0Cabout") && encodeURIComponent("http://unipro.ru/\fabout") !== "http%3A%2F%2Funipro.ru%2F%0cabout") {
24 $ERROR('#3: http://unipro.ru/\\fabout');
25 }
26
27 //CHECK#4
28 if ((encodeURIComponent("http://unipro.ru/\rabout") !== "http%3A%2F%2Funipro.ru%2F%0Dabout") && encodeURIComponent("http://unipro.ru/\rabout") !== "http%3A%2F%2Funipro.ru%2F%0dabout") {
29 $ERROR('#4: http://unipro.ru/\\rabout');
30 }