ggaren@apple.com | 24abba8 | 2008-12-10 07:54:04 +0000 | [diff] [blame] | 1 | This page tests assertions followed by quantifiers. |
| 2 | |
| 3 | On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| 4 | |
| 5 | |
| 6 | |
| 7 | Testing regexp: /(?=a){0}/gm |
| 8 | PASS regexp.test('a') is true |
| 9 | PASS regexp.lastIndex is 0 |
| 10 | |
| 11 | Testing regexp: /(?=a){1}/gm |
| 12 | PASS regexp.test('a') is true |
| 13 | PASS regexp.lastIndex is 0 |
| 14 | |
| 15 | Testing regexp: /(?!a){0}/gm |
| 16 | PASS regexp.test('b') is true |
| 17 | PASS regexp.lastIndex is 0 |
| 18 | |
| 19 | Testing regexp: /(?!a){1}/gm |
| 20 | PASS regexp.test('b') is true |
| 21 | PASS regexp.lastIndex is 0 |
ggaren@apple.com | e151473 | 2009-01-16 08:01:44 +0000 | [diff] [blame] | 22 | PASS /^(?=a)?b$/.test("b") is true |
ggaren@apple.com | 24abba8 | 2008-12-10 07:54:04 +0000 | [diff] [blame] | 23 | PASS successfullyParsed is true |
| 24 | |
| 25 | TEST COMPLETE |
| 26 | |