|
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 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 VERSION = 'no version'; |
|
17 var TITLE = 'RegExp: .'; |
|
18 var BUGNUMBER="123802"; |
|
19 |
|
20 startTest(); |
|
21 writeHeaderToLog('Executing script: control_characters.js'); |
|
22 writeHeaderToLog( SECTION + " "+ TITLE); |
|
23 |
|
24 |
|
25 // 'àOÐ ê:i¢Ø'.match(new RegExp('.+')) |
|
26 new TestCase ( SECTION, "'àOÐ ê:i¢Ø'.match(new RegExp('.+'))", |
|
27 String(['àOÐ ê:i¢Ø']), String('àOÐ ê:i¢Ø'.match(new RegExp('.+')))); |
|
28 |
|
29 // string1.match(new RegExp(string1)) |
|
30 var string1 = 'àOÐ ê:i¢Ø'; |
|
31 new TestCase ( SECTION, "string1 = " + string1 + " string1.match(string1)", |
|
32 String([string1]), String(string1.match(string1))); |
|
33 |
|
34 string1 = ""; |
|
35 for (var i = 0; i < 32; i++) |
|
36 string1 += String.fromCharCode(i); |
|
37 new TestCase ( SECTION, "string1 = " + string1 + " string1.match(string1)", |
|
38 String([string1]), String(string1.match(string1))); |
|
39 |
|
40 test(); |