Fix several Decode tests (#1357)

The tests are explicitly for bad hex chars at certain indexes, and that
rogue `%` was giving false positives.
This commit is contained in:
Justin Ridgewell 2017-11-27 12:28:17 -05:00 committed by Leo Balter
parent 1702336a77
commit da61938f8f
6 changed files with 6 additions and 6 deletions

View File

@ -20,7 +20,7 @@ var interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];
for (var indexI = 0; indexI < interval.length; indexI++) {
for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {
try {
decodeURI("%E0%" + "%A0" + String.fromCharCode(indexJ, indexJ));
decodeURI("%E0" + "%A0%" + String.fromCharCode(indexJ, indexJ));
result = false;
} catch (e) {
if ((e instanceof URIError) !== true) {

View File

@ -21,7 +21,7 @@ var interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];
for (var indexI = 0; indexI < interval.length; indexI++) {
for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {
try {
decodeURI("%F0%" + "%A0" + String.fromCharCode(indexJ, indexJ) + "%A0");
decodeURI("%F0" + "%A0%" + String.fromCharCode(indexJ, indexJ) + "%A0");
result = false;
} catch (e) {
if ((e instanceof URIError) !== true) {

View File

@ -21,7 +21,7 @@ var interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];
for (var indexI = 0; indexI < interval.length; indexI++) {
for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {
try {
decodeURI("%F0%" + "%A0%A0" + String.fromCharCode(indexJ, indexJ));
decodeURI("%F0" + "%A0%A0%" + String.fromCharCode(indexJ, indexJ));
result = false;
} catch (e) {
if ((e instanceof URIError) !== true) {

View File

@ -20,7 +20,7 @@ var interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];
for (var indexI = 0; indexI < interval.length; indexI++) {
for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {
try {
decodeURIComponent("%E0%" + "%A0" + String.fromCharCode(indexJ, indexJ));
decodeURIComponent("%E0" + "%A0%" + String.fromCharCode(indexJ, indexJ));
result = false;
} catch (e) {
if ((e instanceof URIError) !== true) {

View File

@ -21,7 +21,7 @@ var interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];
for (var indexI = 0; indexI < interval.length; indexI++) {
for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {
try {
decodeURIComponent("%F0%" + "%A0" + String.fromCharCode(indexJ, indexJ) + "%A0");
decodeURIComponent("%F0" + "%A0%" + String.fromCharCode(indexJ, indexJ) + "%A0");
result = false;
} catch (e) {
if ((e instanceof URIError) !== true) {

View File

@ -21,7 +21,7 @@ var interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];
for (var indexI = 0; indexI < interval.length; indexI++) {
for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {
try {
decodeURIComponent("%F0%" + "%A0%A0" + String.fromCharCode(indexJ, indexJ));
decodeURIComponent("%F0" + "%A0%A0%" + String.fromCharCode(indexJ, indexJ));
result = false;
} catch (e) {
if ((e instanceof URIError) !== true) {