1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3 * File Name: RegExp/regress-001.js
5 * Description: Regression test case:
6 * JS regexp anchoring on empty match bug
7 * http://bugzilla.mozilla.org/show_bug.cgi?id=2157
9 * Author: christine@netscape.com
10 * Date: 19 February 1999
12 var SECTION = "RegExp/hex-001.js";
13 var VERSION = "ECMA_2";
14 var TITLE = "JS regexp anchoring on empty match bug";
15 var BUGNUMBER = "http://bugzilla.mozilla.org/show_bug.cgi?id=2157";
19 AddRegExpCases( /a||b/(''),
26 function AddRegExpCases( regexp, str_regexp, length, matches_array ) {
29 "( " + str_regexp + " ).length",
34 for ( var matches = 0; matches < matches_array.length; matches++ ) {
36 "( " + str_regexp + " )[" + matches +"]",
37 matches_array[matches],