Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-185165.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: 13 Dec 2002
9 * SUMMARY: Decompilation of "\\" should give "\\"
10 * See http://bugzilla.mozilla.org/show_bug.cgi?id=185165
11 *
12 */
13 //-----------------------------------------------------------------------------
14 var gTestfile = 'regress-185165.js';
15 var UBound = 0;
16 var BUGNUMBER = 185165;
17 var summary = 'Decompilation of "\\\\" should give "\\\\"';
18 var status = '';
19 var statusitems = [];
20 var actual = '';
21 var actualvalues = [];
22 var expect= '';
23 var expectedvalues = [];
24
25
26 // Check that second decompilation of script gives the same string as first one
27 var f1 = function() { return "\\"; }
28 var s1 = f1.toString();
29
30 var f2;
31 eval("f2=" + s1);
32 var s2 = f2.toString();
33
34 status = inSection(1);
35 actual = s2;
36 expect = s1;
37 addThis();
38
39
40
41 //-----------------------------------------------------------------------------
42 test();
43 //-----------------------------------------------------------------------------
44
45
46
47 function addThis()
48 {
49 statusitems[UBound] = status;
50 actualvalues[UBound] = actual;
51 expectedvalues[UBound] = expect;
52 UBound++;
53 }
54
55
56 function test()
57 {
58 enterFunc('test');
59 printBugNumber(BUGNUMBER);
60 printStatus(summary);
61
62 for (var i=0; i<UBound; i++)
63 {
64 reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
65 }
66
67 exitFunc ('test');
68 }