2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
|
|
|
info: URI tests
|
2017-06-29 20:03:03 +02:00
|
|
|
esid: sec-encodeuri-uri
|
2014-07-22 01:09:02 +02:00
|
|
|
description: Checking URL with Line Terminator
|
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
//CHECK#1
|
|
|
|
if ((encodeURI("http://unipro.ru/\nabout") !== "http://unipro.ru/%0Aabout") && encodeURI("http://unipro.ru/\nabout") !== "http://unipro.ru/%0aabout") {
|
2021-07-21 21:37:52 +02:00
|
|
|
throw new Test262Error('#1: http://unipro.ru/\\nabout');
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//CHECK#2
|
|
|
|
if ((encodeURI("http://unipro.ru/\vabout") !== "http://unipro.ru/%0Babout") && encodeURI("http://unipro.ru/\vabout") !== "http://unipro.ru/%0babout") {
|
2021-07-21 21:37:52 +02:00
|
|
|
throw new Test262Error('#2: http://unipro.ru/\\vabout');
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//CHECK#3
|
|
|
|
if ((encodeURI("http://unipro.ru/\fabout") !== "http://unipro.ru/%0Cabout") && encodeURI("http://unipro.ru/\fabout") !== "http://unipro.ru/%0cabout") {
|
2021-07-21 21:37:52 +02:00
|
|
|
throw new Test262Error('#3: http://unipro.ru/\\fabout');
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//CHECK#4
|
|
|
|
if ((encodeURI("http://unipro.ru/\rabout") !== "http://unipro.ru/%0Dabout") && encodeURI("http://unipro.ru/\rabout") !== "http://unipro.ru/%0dabout") {
|
2021-07-21 21:37:52 +02:00
|
|
|
throw new Test262Error('#4: http://unipro.ru/\\rabout');
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|