Remove trailing whitespace

This commit is contained in:
Lyza Danger Gardner 2017-06-29 13:45:58 -04:00
parent f32871c708
commit 4d896c0dc2
19 changed files with 123 additions and 123 deletions

View File

@ -16,31 +16,31 @@ var indexP;
var indexO = 0;
for (var index = 0xDC00; index <= 0xDFFF; index++) {
count++;
count++;
var hex = decimalToHexString(index);
try {
encodeURIComponent(String.fromCharCode(index));
} catch (e) {
if ((e instanceof URIError) === true) continue;
} catch (e) {
if ((e instanceof URIError) === true) continue;
}
if (indexO === 0) {
if (indexO === 0) {
indexO = index;
} else {
if ((index - indexP) !== 1) {
if ((index - indexP) !== 1) {
if ((indexP - indexO) !== 0) {
var hexP = decimalToHexString(indexP);
var hexO = decimalToHexString(indexO);
$ERROR('#' + hexO + '-' + hexP + ' ');
}
}
else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
indexO = index;
}
}
}
indexP = index;
errorCount++;
errorCount++;
}
if (errorCount > 0) {
@ -51,6 +51,6 @@ if (errorCount > 0) {
} else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
}

View File

@ -16,31 +16,31 @@ var indexP;
var indexO = 0;
for (var index = 0xDC00; index <= 0xDFFF; index++) {
count++;
count++;
var hex = decimalToHexString(index);
try {
encodeURIComponent(String.fromCharCode(index, 0x0041));
} catch (e) {
if ((e instanceof URIError) === true) continue;
} catch (e) {
if ((e instanceof URIError) === true) continue;
}
if (indexO === 0) {
if (indexO === 0) {
indexO = index;
} else {
if ((index - indexP) !== 1) {
if ((index - indexP) !== 1) {
if ((indexP - indexO) !== 0) {
var hexP = decimalToHexString(indexP);
var hexO = decimalToHexString(indexO);
$ERROR('#' + hexO + '-' + hexP + ' ');
}
}
else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
indexO = index;
}
}
}
indexP = index;
errorCount++;
errorCount++;
}
if (errorCount > 0) {
@ -51,6 +51,6 @@ if (errorCount > 0) {
} else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
}

View File

@ -18,31 +18,31 @@ var indexP;
var indexO = 0;
for (var index = 0xD800; index <= 0xDBFF; index++) {
count++;
count++;
var hex = decimalToHexString(index);
try {
encodeURIComponent(String.fromCharCode(index));
} catch (e) {
if ((e instanceof URIError) === true) continue;
} catch (e) {
if ((e instanceof URIError) === true) continue;
}
if (indexO === 0) {
if (indexO === 0) {
indexO = index;
} else {
if ((index - indexP) !== 1) {
if ((index - indexP) !== 1) {
if ((indexP - indexO) !== 0) {
var hexP = decimalToHexString(indexP);
var hexO = decimalToHexString(indexO);
$ERROR('#' + hexO + '-' + hexP + ' ');
}
}
else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
indexO = index;
}
}
}
indexP = index;
errorCount++;
errorCount++;
}
if (errorCount > 0) {
@ -53,6 +53,6 @@ if (errorCount > 0) {
} else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
}

View File

@ -18,31 +18,31 @@ var indexP;
var indexO = 0;
for (var index = 0xD800; index <= 0xDBFF; index++) {
count++;
count++;
var hex = decimalToHexString(index);
try {
encodeURIComponent(String.fromCharCode(0x0041, index));
} catch (e) {
if ((e instanceof URIError) === true) continue;
} catch (e) {
if ((e instanceof URIError) === true) continue;
}
if (indexO === 0) {
if (indexO === 0) {
indexO = index;
} else {
if ((index - indexP) !== 1) {
if ((index - indexP) !== 1) {
if ((indexP - indexO) !== 0) {
var hexP = decimalToHexString(indexP);
var hexO = decimalToHexString(indexO);
$ERROR('#' + hexO + '-' + hexP + ' ');
}
}
else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
indexO = index;
}
}
}
indexP = index;
errorCount++;
errorCount++;
}
if (errorCount > 0) {
@ -53,6 +53,6 @@ if (errorCount > 0) {
} else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
}

View File

@ -21,37 +21,37 @@ var indexP;
var indexO = 0;
for (var index = 0xD800; index <= 0xDBFF; index++) {
count++;
count++;
var res = true;
for (var indexC = 0; indexC < chars.length; indexC++) {
var hex = decimalToHexString(index);
try {
encodeURIComponent(String.fromCharCode(index, chars[indexC]));
} catch (e) {
encodeURIComponent(String.fromCharCode(index, chars[indexC]));
} catch (e) {
if ((e instanceof URIError) === true) continue;
}
res = false;
}
if (res !== true) {
if (indexO === 0) {
if (indexO === 0) {
indexO = index;
} else {
if ((index - indexP) !== 1) {
if ((index - indexP) !== 1) {
if ((indexP - indexO) !== 0) {
var hexP = decimalToHexString(indexP);
var hexO = decimalToHexString(indexO);
$ERROR('#' + hexO + '-' + hexP + ' ');
}
}
else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
indexO = index;
}
}
}
indexP = index;
errorCount++;
}
errorCount++;
}
}
if (errorCount > 0) {
@ -62,6 +62,6 @@ if (errorCount > 0) {
} else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
}

View File

@ -18,33 +18,33 @@ var count = 0;
var indexP;
var indexO = 0;
l :
l :
for (var index = 0x0000; index <= 0x007F; index++) {
count++;
var str = String.fromCharCode(index);
for (var indexC = 0; indexC < uriUnescaped.length; indexC++) {
if (uriUnescaped[indexC] === str) continue l;
}
}
if (encodeURIComponent(str).toUpperCase() === decimalToPercentHexString(index)) continue l;
if (indexO === 0) {
if (indexO === 0) {
indexO = index;
} else {
if ((index - indexP) !== 1) {
if ((index - indexP) !== 1) {
if ((indexP - indexO) !== 0) {
var hexP = decimalToHexString(indexP);
var hexO = decimalToHexString(indexO);
$ERROR('#' + hexO + '-' + hexP + ' ');
}
}
else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
indexO = index;
}
}
}
indexP = index;
errorCount++;
errorCount++;
}
if (errorCount > 0) {
@ -55,6 +55,6 @@ if (errorCount > 0) {
} else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
}

View File

@ -15,33 +15,33 @@ includes: [decimalToHexString.js]
var errorCount = 0;
var count = 0;
var indexP;
var indexO = 0;
var indexO = 0;
l:
for (var index = 0x0080; index <= 0x07FF; index++) {
count++;
count++;
var hex1 = decimalToPercentHexString(0x0080 + (index & 0x003F));
var hex2 = decimalToPercentHexString(0x00C0 + (index & 0x07C0) / 0x0040);
var str = String.fromCharCode(index);
if (encodeURIComponent(str).toUpperCase() === hex2 + hex1) continue;
if (indexO === 0) {
if (indexO === 0) {
indexO = index;
} else {
if ((index - indexP) !== 1) {
if ((index - indexP) !== 1) {
if ((indexP - indexO) !== 0) {
var hexP = decimalToHexString(indexP);
var hexO = decimalToHexString(indexO);
$ERROR('#' + hexO + '-' + hexP + ' ');
}
}
else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
indexO = index;
}
}
}
indexP = index;
errorCount++;
errorCount++;
}
if (errorCount > 0) {
@ -52,6 +52,6 @@ if (errorCount > 0) {
} else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
}

View File

@ -15,34 +15,34 @@ includes: [decimalToHexString.js]
var errorCount = 0;
var count = 0;
var indexP;
var indexO = 0;
var indexO = 0;
for (var index = 0x0800; index <= 0xD7FF; index++) {
count++;
count++;
var hex1 = decimalToPercentHexString(0x0080 + (index & 0x003F));
var hex2 = decimalToPercentHexString(0x0080 + (index & 0x0FC0) / 0x0040);
var hex3 = decimalToPercentHexString(0x00E0 + (index & 0xF000) / 0x1000);
var str = String.fromCharCode(index);
if (encodeURIComponent(str).toUpperCase() === hex3 + hex2 + hex1) continue;
if (indexO === 0) {
if (indexO === 0) {
indexO = index;
} else {
if ((index - indexP) !== 1) {
if ((index - indexP) !== 1) {
if ((indexP - indexO) !== 0) {
var hexP = decimalToHexString(indexP);
var hexO = decimalToHexString(indexO);
$ERROR('#' + hexO + '-' + hexP + ' ');
}
}
else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
indexO = index;
}
}
}
indexP = index;
errorCount++;
}
errorCount++;
}
if (errorCount > 0) {
if ((indexP - indexO) !== 0) {
@ -52,6 +52,6 @@ if (errorCount > 0) {
} else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
}

View File

@ -19,7 +19,7 @@ var chars = [0xDC00, 0xDDFF, 0xDFFF];
var errorCount = 0;
var count = 0;
var indexP;
var indexO = 0;
var indexO = 0;
for (var index = 0xD800; index <= 0xDBFF; index++) {
var res = true;
for (var indexC = 0; indexC < chars.length; indexC++) {
@ -33,27 +33,27 @@ for (var index = 0xD800; index <= 0xDBFF; index++) {
res = false;
}
if (res !== true) {
if (indexO === 0) {
if (res !== true) {
if (indexO === 0) {
indexO = index;
} else {
if ((index - indexP) !== 1) {
if ((index - indexP) !== 1) {
if ((indexP - indexO) !== 0) {
var hexP = decimalToHexString(indexP);
var hexO = decimalToHexString(indexO);
$ERROR('#' + hexO + '-' + hexP + ' ');
}
}
else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
indexO = index;
}
}
}
indexP = index;
errorCount++;
errorCount++;
}
count++;
count++;
}
if (errorCount > 0) {
@ -64,6 +64,6 @@ if (errorCount > 0) {
} else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
}

View File

@ -19,7 +19,7 @@ var chars = [0xD800, 0xDBFF, 0xD9FF];
var errorCount = 0;
var count = 0;
var indexP;
var indexO = 0;
var indexO = 0;
for (var index = 0xDC00; index <= 0xDFFF; index++) {
var res = true;
for (var indexC = 0; indexC < chars.length; indexC++) {
@ -33,27 +33,27 @@ for (var index = 0xDC00; index <= 0xDFFF; index++) {
res = false;
}
if (res !== true) {
if (indexO === 0) {
if (res !== true) {
if (indexO === 0) {
indexO = index;
} else {
if ((index - indexP) !== 1) {
if ((index - indexP) !== 1) {
if ((indexP - indexO) !== 0) {
var hexP = decimalToHexString(indexP);
var hexO = decimalToHexString(indexO);
$ERROR('#' + hexO + '-' + hexP + ' ');
}
}
else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
indexO = index;
}
}
}
indexP = index;
errorCount++;
errorCount++;
}
count++;
count++;
}
if (errorCount > 0) {
@ -64,6 +64,6 @@ if (errorCount > 0) {
} else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
}

View File

@ -15,33 +15,33 @@ includes: [decimalToHexString.js]
var errorCount = 0;
var count = 0;
var indexP;
var indexO = 0;
var indexO = 0;
for (var index = 0xE000; index <= 0xFFFF; index++) {
count++;
count++;
var hex1 = decimalToPercentHexString(0x0080 + (index & 0x003F));
var hex2 = decimalToPercentHexString(0x0080 + (index & 0x0FC0) / 0x0040);
var hex3 = decimalToPercentHexString(0x00E0 + (index & 0xF000) / 0x1000);
var str = String.fromCharCode(index);
if (encodeURIComponent(str).toUpperCase() === hex3 + hex2 + hex1) continue;
if (indexO === 0) {
if (indexO === 0) {
indexO = index;
} else {
if ((index - indexP) !== 1) {
if ((index - indexP) !== 1) {
if ((indexP - indexO) !== 0) {
var hexP = decimalToHexString(indexP);
var hexO = decimalToHexString(indexO);
$ERROR('#' + hexO + '-' + hexP + ' ');
}
}
else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
indexO = index;
}
}
}
indexP = index;
errorCount++;
errorCount++;
}
if (errorCount > 0) {
@ -52,6 +52,6 @@ if (errorCount > 0) {
} else {
var hexP = decimalToHexString(indexP);
$ERROR('#' + hexP + ' ');
}
}
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
}

View File

@ -15,5 +15,5 @@ for (var indexC = 0; indexC < 10; indexC++) {
var str = uriReserved_[indexC];
if (encodeURIComponent(str) !== uriReserved[indexC]) {
$ERROR('#' + (indexC + 1) + ': unescapedURIComponentSet not containing' + str);
}
}
}

View File

@ -13,8 +13,8 @@ description: "Complex tests, uriUnescaped :: uriAlpha"
var uriAlpha = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
for (var indexC = 0; indexC < uriAlpha.length; indexC++) {
var str = uriAlpha[indexC];
var str = uriAlpha[indexC];
if (encodeURIComponent(str) !== str) {
$ERROR('#' + (indexC + 1) + ': unescapedURISet containing ' + str);
}
}
}

View File

@ -13,8 +13,8 @@ description: "Complex tests, uriUnescaped :: DecimalDigit"
var DecimalDigit = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
for (var indexC = 0; indexC < DecimalDigit.length; indexC++) {
var str = DecimalDigit[indexC];
var str = DecimalDigit[indexC];
if (encodeURIComponent(str) !== str) {
$ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str);
}
}
}

View File

@ -13,8 +13,8 @@ description: "Complex tests, uriUnescaped :: uriMark"
var uriMark = ["-", "_", ".", "!", "~", "*", "'", "(", ")"];
for (var indexC = 0; indexC < uriMark.length; indexC++) {
var str = uriMark[indexC];
var str = uriMark[indexC];
if (encodeURIComponent(str) !== str) {
$ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str);
}
}
}

View File

@ -22,7 +22,7 @@ if (encodeURIComponent("http://unipro.ru") !== "http%3A%2F%2Funipro.ru") {
//CHECK#3
if (encodeURIComponent("http://www.google.ru/support/jobs/bin/static.py?page=why-ru.html&sid=liveandwork") !== "http%3A%2F%2Fwww.google.ru%2Fsupport%2Fjobs%2Fbin%2Fstatic.py%3Fpage%3Dwhy-ru.html%26sid%3Dliveandwork") {
$ERROR('#3: http://www.google.ru/support/jobs/bin/static.py?page=why-ru.html&sid=liveandwork"');
}
}
//CHECK#4
if (encodeURIComponent("http://en.wikipedia.org/wiki/UTF-8#Description") !== "http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FUTF-8%23Description") {

View File

@ -19,7 +19,7 @@ var result = true;
for (var p in encodeURIComponent){
if (p === "length") {
result = false;
}
}
}
if (result !== true) {

View File

@ -19,7 +19,7 @@ var result = true;
for (var p in this){
if (p === "encodeURIComponent") {
result = false;
}
}
}
if (result !== true) {

View File

@ -19,7 +19,7 @@ if (encodeURIComponent(object) !== "%5Bobject%20Object%5D") {
var object = {valueOf: function() {return ""}, toString: function() {return "^"}};
if (encodeURIComponent(object) !== "%5E") {
$ERROR('#2: var object = {valueOf: function() {return ""}, toString: function() {return "^"}}; encodeURIComponent(object) === "%5E". Actual: ' + (encodeURIComponent(object)));
}
}
//CHECK#3
var object = {valueOf: function() {return "^"}, toString: function() {return {}}};
@ -59,11 +59,11 @@ try {
var object = {valueOf: function() {return "^"}, toString: function() {throw "error"}};
encodeURIComponent(object);
$ERROR('#7.1: var object = {valueOf: function() {return "^"}, toString: function() {throw "error"}}; encodeURIComponent(object) throw "error". Actual: ' + (encodeURIComponent(object)));
}
}
catch (e) {
if (e !== "error") {
$ERROR('#7.2: var object = {valueOf: function() {return "^"}, toString: function() {throw "error"}}; encodeURIComponent(object) throw "error". Actual: ' + (e));
}
}
}
//CHECK#8
@ -71,9 +71,9 @@ try {
var object = {valueOf: function() {return {}}, toString: function() {return {}}};
encodeURIComponent(object);
$ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; encodeURIComponent(object) throw TypeError. Actual: ' + (encodeURIComponent(object)));
}
}
catch (e) {
if ((e instanceof TypeError) !== true) {
$ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; encodeURIComponent(object) throw TypeError. Actual: ' + (e));
}
}
}