Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-191668.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 /*
7 *
8 * Date: 03 February 2003
9 * SUMMARY: Testing script containing <!- at internal buffer boundary.
10 * JS parser must look for HTML comment-opener <!--, but mustn't disallow <!-
11 *
12 * See http://bugzilla.mozilla.org/show_bug.cgi?id=191668
13 *
14 */
15 //-----------------------------------------------------------------------------
16 var gTestfile = 'regress-191668.js';
17 var UBound = 0;
18 var BUGNUMBER = 191668;
19 var summary = 'Testing script containing <!- at internal buffer boundary';
20 var status = '';
21 var statusitems = [];
22 var actual = '';
23 var actualvalues = [];
24 var expect= '';
25 var expectedvalues = [];
26
27 var N = 512;
28 var j = 0;
29 var str = 'if (0<!-0) ++j;';
30
31 for (var i=0; i!=N; ++i)
32 {
33 eval(str);
34 str = ' ' + str;
35 }
36
37 status = inSection(1);
38 actual = j;
39 expect = N;
40 addThis();
41
42
43
44 //-----------------------------------------------------------------------------
45 test();
46 //-----------------------------------------------------------------------------
47
48
49
50 function addThis()
51 {
52 statusitems[UBound] = status;
53 actualvalues[UBound] = actual;
54 expectedvalues[UBound] = expect;
55 UBound++;
56 }
57
58
59 function test()
60 {
61 enterFunc('test');
62 printBugNumber(BUGNUMBER);
63 printStatus(summary);
64
65 for (var i=0; i<UBound; i++)
66 {
67 reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
68 }
69
70 exitFunc ('test');
71 }