| 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_T1 |
| 7 |
es6id: 18.2.6.5 |
| 8 |
esid: sec-encodeuricomponent-uricomponent |
| 9 |
description: Checking ENGLISH ALPHABET |
| 10 |
---*/ |
| 11 |
|
| 12 |
//CHECK#1 |
| 13 |
if (encodeURIComponent("http://unipro.ru/0123456789") !== "http%3A%2F%2Funipro.ru%2F0123456789") { |
| 14 |
$ERROR('#1: http://unipro.ru/0123456789'); |
| 15 |
} |
| 16 |
|
| 17 |
//CHECK#2 |
| 18 |
if (encodeURIComponent("aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ") !== "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ") { |
| 19 |
$ERROR('#2: aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ'); |
| 20 |
} |
| 21 |
|
| 22 |
//CHECK#3 |
| 23 |
if (encodeURIComponent(";/?:@&=+$,") !== "%3B%2F%3F%3A%40%26%3D%2B%24%2C") { |
| 24 |
$ERROR('#3: '); |
| 25 |
} |