Debian Codegraph @

rhino/testsrc/tests/js1_5/extensions/regress-422592.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-422592.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 422592;
9 var summary = 'js.c dis/dissrc should not kill script execution';
10 var actual = '';
11 var expect = '';
12
13
14 //-----------------------------------------------------------------------------
15 test();
16 //-----------------------------------------------------------------------------
17
18 function test()
19 {
20 enterFunc ('test');
21 printBugNumber(BUGNUMBER);
22 printStatus (summary);
23
24 if (typeof dis == 'undefined')
25 {
26 expect = actual = 'Test requires function dis. Not tested';
27 print(expect);
28 }
29 else
30 {
31 expect = 'Completed';
32 actual = 'Not Completed';
33 print('Before dis');
34 try
35 {
36 dis(print);
37 }
38 catch(ex)
39 {
40 print(ex + '');
41 }
42 print('After dis');
43 actual = 'Completed';
44 }
45 reportCompare(expect, actual, summary);
46
47 if (typeof dissrc == 'undefined')
48 {
49 expect = actual = 'Test requires function dissrc. Not tested';
50 print(expect);
51 }
52 else
53 {
54 print('Before dissrc');
55 expect = 'Completed';
56 actual = 'Not Completed';
57 try
58 {
59 dissrc(print);
60 }
61 catch(ex)
62 {
63 print(ex + '');
64 }
65 print('After dissrc');
66 actual = 'Completed';
67 }
68 reportCompare(expect, actual, summary);
69
70 exitFunc ('test');
71 }