Debian Codegraph @

js/src/tests/non262/RegExp/control_characters.js

raw
1 /* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 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 Filename: control_characters.js
9 Description: 'Tests regular expressions containing .'
10
11 Author: Nick Lerissa
12 Date: April 8, 1998
13 */
14
15 var SECTION = 'As described in Netscape doc "Whats new in JavaScript 1.2"';
16 var TITLE = 'RegExp: .';
17 var BUGNUMBER="123802";
18
19 printBugNumber(BUGNUMBER);
20 writeHeaderToLog('Executing script: control_characters.js');
21 writeHeaderToLog( SECTION + " "+ TITLE);
22
23
24 // 'àOÐ ê:i¢Ø'.match(new RegExp('.+'))
25 new TestCase ( "'àOÐ ê:i¢Ø'.match(new RegExp('.+'))",
26 String(['àOÐ ê:i¢Ø']), String('àOÐ ê:i¢Ø'.match(new RegExp('.+'))));
27
28 // string1.match(new RegExp(string1))
29 var string1 = 'àOÐ ê:i¢Ø';
30 new TestCase ( "string1 = " + string1 + " string1.match(string1)",
31 String([string1]), String(string1.match(string1)));
32
33 string1 = "";
34 for (var i = 0; i < 32; i++)
35 string1 += String.fromCharCode(i);
36 new TestCase ( "string1 = " + string1 + " string1.match(string1)",
37 String([string1]), String(string1.match(string1)));
38
39 test();