From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- js/src/jit-test/tests/auto-regress/bug730806.js | 60 +++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 js/src/jit-test/tests/auto-regress/bug730806.js (limited to 'js/src/jit-test/tests/auto-regress/bug730806.js') diff --git a/js/src/jit-test/tests/auto-regress/bug730806.js b/js/src/jit-test/tests/auto-regress/bug730806.js new file mode 100644 index 000000000..4ceb5274e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug730806.js @@ -0,0 +1,60 @@ +// Binary: cache/js-opt-32-2dc40eb83023-linux +// Flags: -m -n -a +// +function toPrinted(value) + value = value.replace(/\\n/g, 'NL') + .replace(/\\r/g, 'CR') + .replace(/[^\x20-\x7E]+/g, escapeString); +function escapeString (str) +{ + var a, b, c, d; + var len = str.length; + var result = ""; + var digits = ["0", "1", "2", "3", "4", "5", "6", "7", + "8", "9", "A", "B", "C", "D", "E", "F"]; + for (var i=0; i>= 4; + d = digits[ch & 0xf]; + result += "\\u" + d + c + b + a; + } + } +} +function reportCompare (expected, actual, description) { +function test() { + try + { + } + catch(e) + { + } + } +} +try { +gczeal(2,4); +function setprop() { +} +} catch(exc1) {} +var trimMethods = ['trim', 'trimLeft', 'trimRight']; +var whitespace = [ + {s : '\u2028', t : 'LINE SEPARATOR'}, + ]; +for (var j = 0; j < trimMethods.length; ++j) +{ + var method = trimMethods[j]; + for (var i = 0; i < whitespace.length; ++i) + { + var v = whitespace[i].s; + var t = whitespace[i].t; + v = v + v + v; + str = v; + expected = ''; + actual = str[method](); + reportCompare(expected, actual, t + ':' + '"' + toPrinted(str) + '".' + method + '()'); + } +} -- cgit v1.2.3