Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-230216-1.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 var gTestfile = 'regress-230216-1.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 230216;
9 var summary = 'check for numerical overflow in regexps in back reference and bounds for {} quantifier';
10 var actual = '';
11 var expect = '';
12 var status = '';
13
14 printBugNumber(BUGNUMBER);
15 printStatus (summary);
16
17 status = inSection(1) + ' check for overflow in backref';
18
19 actual = 'undefined';
20 expect = false;
21
22 try
23 {
24 actual = eval('/(a)\21474836481/.test("aa")');
25 }
26 catch(e)
27 {
28 status += ' Error: ' + e;
29 }
30
31 reportCompare(expect, actual, status);
32
33 status = inSection(2) + ' check for overflow in backref';
34
35 actual = 'undefined';
36 expect = false;
37
38 try
39 {
40 actual = eval('/a\21474836480/.test("")');
41 }
42 catch(e)
43 {
44 status += ' Error: ' + e;
45 }
46
47 reportCompare(expect, actual, status);
48