Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-248444.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-248444.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 248444;
9 var summary = 'toString/toSource of RegExp should escape slashes';
10 var actual = '';
11 var expect = '';
12
13 printBugNumber(BUGNUMBER);
14 printStatus (summary);
15
16 var re;
17 expect = '/[^\\/]+$/';
18
19 status = summary + ' ' + inSection(1);
20 re = /[^\/]+$/;
21 actual = re.toString();
22 reportCompare(expect, actual, status);
23
24 status = summary + ' ' + inSection(2);
25 re = RegExp("[^\\\/]+$");
26 actual = re.toString();
27 reportCompare(expect, actual, status);
28
29 status = summary + ' ' + inSection(3);
30 re = RegExp("[^\\/]+$");
31 actual = re.toString();
32 reportCompare(expect, actual, status);
33
34 status = summary + ' ' + inSection(4);
35 re = RegExp("[^\/]+$");
36 actual = re.toString();
37 reportCompare(expect, actual, status);
38
39 status = summary + ' ' + inSection(5);
40 re = RegExp("[^/]+$");
41 actual = re.toString();
42 reportCompare(expect, actual, status);
43
44