|
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: 02 July 2003 |
|
9 * SUMMARY: testing line ending with |continue| and only terminated by a CR |
|
10 * |
|
11 * See http://bugzilla.mozilla.org/show_bug.cgi?id=210682 |
|
12 * |
|
13 * |
|
14 */ |
|
15 //----------------------------------------------------------------------------- |
|
16 var UBound = 0; |
|
17 var BUGNUMBER = 210682; |
|
18 var summary = 'testing line ending with |continue| and only terminated by CR'; |
|
19 var status = ''; |
|
20 var statusitems = []; |
|
21 var actual = ''; |
|
22 var actualvalues = []; |
|
23 var expect= ''; |
|
24 var expectedvalues = []; |
|
25 |
|
26 |
|
27 for (i=0; i<100; i++) |
|
28 { |
|
29 if (i%2 == 0) continue |
|
30 this.lasti = i; |
|
31 } |
|
32 |
|
33 status = inSection(1); |
|
34 actual = lasti; |
|
35 expect = 99; |
|
36 addThis(); |
|
37 |
|
38 |
|
39 |
|
40 //----------------------------------------------------------------------------- |
|
41 test(); |
|
42 //----------------------------------------------------------------------------- |
|
43 |
|
44 |
|
45 |
|
46 function addThis() |
|
47 { |
|
48 statusitems[UBound] = status; |
|
49 actualvalues[UBound] = actual; |
|
50 expectedvalues[UBound] = expect; |
|
51 UBound++; |
|
52 } |
|
53 |
|
54 |
|
55 function test() |
|
56 { |
|
57 enterFunc('test'); |
|
58 printBugNumber(BUGNUMBER); |
|
59 printStatus(summary); |
|
60 |
|
61 for (var i=0; i<UBound; i++) |
|
62 { |
|
63 reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]); |
|
64 } |
|
65 |
|
66 exitFunc ('test'); |
|
67 } |