/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

var gTestfile = 'regress-274888.js';
//-----------------------------------------------------------------------------
var BUGNUMBER = 274888;
var summary = 'Negative lookahead should match at positions > approx. 64k';
var actual = '';
var expect = '';

enterFunc ('test');
printBugNumber(BUGNUMBER);
printStatus (summary);

var re;
var status;
var s;

re = /(?!\d)a/;
status = summary + ' ' + inSection(1) + ' /(?!\\d)a/.text("12345a")';
s = '12345a';

expect = true; 
actual = re.test(s);

reportCompare(expect, actual, status);

re = /(?!\d)a/;
status = summary + ' ' + inSection(2) + ' ' + '/(?!\\d)a/.text("1...ka")';
s = '[encoded data, 65540 characters]';

expect = true; 
actual = re.test(s);

reportCompare(expect, actual, status);

exitFunc ('test');

