Debian Codegraph @

rhino/testsrc/tests/e4x/Regress/regress-347155.js

raw symbols SCIP
1 /* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 gTestfile = 'regress-347155.js';
8
9 var BUGNUMBER = 347155;
10 var summary = 'Do not crash with deeply nested e4x literal';
11 var actual = 'No Crash';
12 var expect = 'No Crash';
13
14 printBugNumber(BUGNUMBER);
15 START(summary);
16
17 function repeat(str, num)
18 {
19 var s="", i;
20 for (i=0; i<num; ++i)
21 s += str;
22 return s;
23 }
24
25 n = 100000;
26 e4x = repeat("<x>", n) + 3 + repeat("</x>", n);
27 try
28 {
29 eval(e4x);
30 }
31 catch(ex)
32 {
33 }
34
35 TEST(1, expect, actual);
36
37 END();