OLD | NEW |
1 Test RegExp.compile method. | 1 Test RegExp.compile method. |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 PASS re.toString() is '/a/i' | 6 PASS re.toString() is '/a/i' |
7 PASS re.multiline is false | 7 PASS re.multiline is false |
8 PASS re.ignoreCase is false | 8 PASS re.ignoreCase is false |
9 PASS re.global is false | 9 PASS re.global is false |
10 PASS re.test('A') is false | 10 PASS re.test('A') is false |
11 PASS re.toString() is '/a/' | 11 PASS re.toString() is '/a/' |
12 PASS re.toString() is '/b/g' | 12 PASS re.toString() is '/b/g' |
13 PASS re.toString() is '/c/' | 13 PASS re.toString() is '/c/' |
14 PASS re.ignoreCase is true | 14 PASS re.ignoreCase is true |
15 PASS re.test('C') is true | 15 PASS re.test('C') is true |
16 PASS re.toString() is '/c/i' | 16 PASS re.toString() is '/c/i' |
17 PASS re.compile(new RegExp('c'), 'i'); threw exception TypeError: Cannot supply
flags when constructing one RegExp from another. | 17 PASS re.compile(new RegExp('c'), 'i'); threw exception TypeError: Cannot supply
flags when constructing one RegExp from another. |
18 PASS re.toString() is '/c/i' | 18 PASS re.toString() is '/c/i' |
19 PASS re.compile(new RegExp('+')); threw exception SyntaxError: Invalid regular e
xpression: /+/: Nothing to repeat. | 19 PASS re.compile(new RegExp('+')); threw exception SyntaxError: Invalid regular e
xpression: /+/: Nothing to repeat. |
20 PASS re.toString() is '/undefined/' | 20 PASS re.toString() is '/undefined/' |
21 PASS re.toString() is '/null/' | 21 PASS re.toString() is '/null/' |
22 FAIL re.toString() should be //. Was /(?:)/. | 22 PASS re.toString() is '/(?:)/' |
23 PASS re.toString() is '/z/' | 23 PASS re.toString() is '/z/' |
24 PASS re.lastIndex is 0 | 24 PASS re.lastIndex is 0 |
25 PASS re.lastIndex is 1 | 25 PASS re.lastIndex is 1 |
26 PASS successfullyParsed is true | 26 PASS successfullyParsed is true |
27 | 27 |
28 TEST COMPLETE | 28 TEST COMPLETE |
OLD | NEW |