From da61938f8fea8e44287dc4bfaafcebe5073398f3 Mon Sep 17 00:00:00 2001 From: Justin Ridgewell Date: Mon, 27 Nov 2017 12:28:17 -0500 Subject: [PATCH] Fix several Decode tests (#1357) The tests are explicitly for bad hex chars at certain indexes, and that rogue `%` was giving false positives. --- test/built-ins/decodeURI/S15.1.3.1_A1.11_T2.js | 2 +- test/built-ins/decodeURI/S15.1.3.1_A1.12_T2.js | 2 +- test/built-ins/decodeURI/S15.1.3.1_A1.12_T3.js | 2 +- test/built-ins/decodeURIComponent/S15.1.3.2_A1.11_T2.js | 2 +- test/built-ins/decodeURIComponent/S15.1.3.2_A1.12_T2.js | 2 +- test/built-ins/decodeURIComponent/S15.1.3.2_A1.12_T3.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/built-ins/decodeURI/S15.1.3.1_A1.11_T2.js b/test/built-ins/decodeURI/S15.1.3.1_A1.11_T2.js index 4e0a40c7bd..abbe44d3cd 100644 --- a/test/built-ins/decodeURI/S15.1.3.1_A1.11_T2.js +++ b/test/built-ins/decodeURI/S15.1.3.1_A1.11_T2.js @@ -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) { diff --git a/test/built-ins/decodeURI/S15.1.3.1_A1.12_T2.js b/test/built-ins/decodeURI/S15.1.3.1_A1.12_T2.js index 55ee69928f..9ceaefc45d 100644 --- a/test/built-ins/decodeURI/S15.1.3.1_A1.12_T2.js +++ b/test/built-ins/decodeURI/S15.1.3.1_A1.12_T2.js @@ -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) { diff --git a/test/built-ins/decodeURI/S15.1.3.1_A1.12_T3.js b/test/built-ins/decodeURI/S15.1.3.1_A1.12_T3.js index c714d05783..4398054735 100644 --- a/test/built-ins/decodeURI/S15.1.3.1_A1.12_T3.js +++ b/test/built-ins/decodeURI/S15.1.3.1_A1.12_T3.js @@ -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) { diff --git a/test/built-ins/decodeURIComponent/S15.1.3.2_A1.11_T2.js b/test/built-ins/decodeURIComponent/S15.1.3.2_A1.11_T2.js index 098fa45852..f26be15409 100644 --- a/test/built-ins/decodeURIComponent/S15.1.3.2_A1.11_T2.js +++ b/test/built-ins/decodeURIComponent/S15.1.3.2_A1.11_T2.js @@ -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) { diff --git a/test/built-ins/decodeURIComponent/S15.1.3.2_A1.12_T2.js b/test/built-ins/decodeURIComponent/S15.1.3.2_A1.12_T2.js index 159148b3da..f8fd13ce0a 100644 --- a/test/built-ins/decodeURIComponent/S15.1.3.2_A1.12_T2.js +++ b/test/built-ins/decodeURIComponent/S15.1.3.2_A1.12_T2.js @@ -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) { diff --git a/test/built-ins/decodeURIComponent/S15.1.3.2_A1.12_T3.js b/test/built-ins/decodeURIComponent/S15.1.3.2_A1.12_T3.js index 13873864ff..f501002a0c 100644 --- a/test/built-ins/decodeURIComponent/S15.1.3.2_A1.12_T3.js +++ b/test/built-ins/decodeURIComponent/S15.1.3.2_A1.12_T3.js @@ -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) {