michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: var gTestfile = 'regress-429241.js'; michael@0: var BUGNUMBER = 429241; michael@0: var summary = '\\x or \\u followed by too few hex digits'; michael@0: var r; michael@0: michael@0: reportCompare( michael@0: "x", michael@0: (r = /[\x]+/.exec("\\x\0")) && r[0], michael@0: "Section 1" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "xy", michael@0: (r = /[\xy]+/.exec("\\xy\0")) && r[0], michael@0: "Section 2" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "x0", michael@0: (r = /[\x0]+/.exec("\\x0\0")) && r[0], michael@0: "Section 3" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "x0y", michael@0: (r = /[\x0y]+/.exec("\\x0y\0")) && r[0], michael@0: "Section 4" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "\0", michael@0: (r = /[\x00]+/.exec("\\x\0")) && r[0], michael@0: "Section 5" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "0\0", michael@0: (r = /[\x000]+/.exec("0\0")) && r[0], michael@0: "Section 6" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "x", michael@0: (r = /^\x$/.exec("x")) && r[0], michael@0: "Section 7" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "xy", michael@0: (r = /^\xy$/.exec("xy")) && r[0], michael@0: "Section 8" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "x0", michael@0: (r = /^\x0$/.exec("x0")) && r[0], michael@0: "Section 9" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "x0y", michael@0: (r = /^\x0y$/.exec("x0y")) && r[0], michael@0: "Section 10" michael@0: ); michael@0: michael@0: reportCompare( michael@0: null, michael@0: /^\x00$/.exec("\0" + "0"), michael@0: "Section 11" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "\0" + "0", michael@0: (r = /^\x000$/.exec("\0" + "0")) && r[0], michael@0: "Section 12" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u", michael@0: (r = /[\u]+/.exec("\\u\0")) && r[0], michael@0: "Section 13" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "uy", michael@0: (r = /[\uy]+/.exec("\\uy\0")) && r[0], michael@0: "Section 14" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u0", michael@0: (r = /[\u0]+/.exec("\\u0\0")) && r[0], michael@0: "Section 15" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u0", michael@0: (r = /[\u00]+/.exec("\\u0\0")) && r[0], michael@0: "Section 16" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u0", michael@0: (r = /[\u000]+/.exec("\\u0\0")) && r[0], michael@0: "Section 17" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u0y", michael@0: (r = /[\u0y]+/.exec("\\u0y\0")) && r[0], michael@0: "Section 18" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u0y", michael@0: (r = /[\u00y]+/.exec("\\u0y\0")) && r[0], michael@0: "Section 19" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u0y", michael@0: (r = /[\u000y]+/.exec("\\u0y\0")) && r[0], michael@0: "Section 20" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "\0", michael@0: (r = /[\u0000]+/.exec("\\u\0")) && r[0], michael@0: "Section 21" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "0\0", michael@0: (r = /[\u00000]+/.exec("0\0")) && r[0], michael@0: "Section 22" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u", michael@0: (r = /^\u$/.exec("u")) && r[0], michael@0: "Section 23" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "uy", michael@0: (r = /^\uy$/.exec("uy")) && r[0], michael@0: "Section 24" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u0", michael@0: (r = /^\u0$/.exec("u0")) && r[0], michael@0: "Section 25" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u00", michael@0: (r = /^\u00$/.exec("u00")) && r[0], michael@0: "Section 26" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u000", michael@0: (r = /^\u000$/.exec("u000")) && r[0], michael@0: "Section 27" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u0y", michael@0: (r = /^\u0y$/.exec("u0y")) && r[0], michael@0: "Section 28" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u00y", michael@0: (r = /^\u00y$/.exec("u00y")) && r[0], michael@0: "Section 29" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "u000y", michael@0: (r = /^\u000y$/.exec("u000y")) && r[0], michael@0: "Section 30" michael@0: ); michael@0: michael@0: reportCompare( michael@0: null, michael@0: /^\u0000$/.exec("\0" + "0"), michael@0: "Section 31" michael@0: ); michael@0: michael@0: reportCompare( michael@0: "\0" + "0", michael@0: (r = /^\u00000$/.exec("\0" + "0")) && r[0], michael@0: "Section 32" michael@0: );