Debian Codegraph @

rhino/testsrc/tests/ecma_3/RegExp/regress-169534.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: 20 Sep 2002
9 * SUMMARY: RegExp conformance test
10 * See http://bugzilla.mozilla.org/show_bug.cgi?id=169534
11 *
12 */
13 //-----------------------------------------------------------------------------
14 var gTestfile = 'regress-169534.js';
15 var UBound = 0;
16 var BUGNUMBER = 169534;
17 var summary = 'RegExp conformance test';
18 var status = '';
19 var statusitems = [];
20 var actual = '';
21 var actualvalues = [];
22 var expect= '';
23 var expectedvalues = [];
24
25
26 status = inSection(1);
27 var re = /(\|)([\w\x81-\xff ]*)(\|)([\/a-z][\w:\/\.]*\.[a-z]{3,4})(\|)/ig;
28 var str = "To sign up click |here|https://www.xxxx.org/subscribe.htm|";
29 actual = str.replace(re, '<a href="$4">$2</a>');
30 expect = 'To sign up click <a href="https://www.xxxx.org/subscribe.htm">here</a>';
31 addThis();
32
33
34
35 //-----------------------------------------------------------------------------
36 test();
37 //-----------------------------------------------------------------------------
38
39
40
41 function addThis()
42 {
43 statusitems[UBound] = status;
44 actualvalues[UBound] = actual;
45 expectedvalues[UBound] = expect;
46 UBound++;
47 }
48
49
50 function test()
51 {
52 enterFunc('test');
53 printBugNumber(BUGNUMBER);
54 printStatus(summary);
55
56 for (var i=0; i<UBound; i++)
57 {
58 reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
59 }
60
61 exitFunc ('test');
62 }