| OLD | NEW |
| (Empty) |
| 1 description( | |
| 2 "This page tests assertions followed by quantifiers." | |
| 3 ); | |
| 4 | |
| 5 var regexp; | |
| 6 | |
| 7 regexp = /(?=a){0}/gm; | |
| 8 debug("\nTesting regexp: " + regexp); | |
| 9 shouldBeTrue("regexp.test('a')"); | |
| 10 shouldBe("regexp.lastIndex", "0"); | |
| 11 | |
| 12 regexp = /(?=a){1}/gm; | |
| 13 debug("\nTesting regexp: " + regexp); | |
| 14 shouldBeTrue("regexp.test('a')"); | |
| 15 shouldBe("regexp.lastIndex", "0"); | |
| 16 | |
| 17 regexp = /(?!a){0}/gm; | |
| 18 debug("\nTesting regexp: " + regexp); | |
| 19 shouldBeTrue("regexp.test('b')"); | |
| 20 shouldBe("regexp.lastIndex", "0"); | |
| 21 | |
| 22 regexp = /(?!a){1}/gm; | |
| 23 debug("\nTesting regexp: " + regexp); | |
| 24 shouldBeTrue("regexp.test('b')"); | |
| 25 shouldBe("regexp.lastIndex", "0"); | |
| 26 | |
| 27 shouldBeTrue('/^(?=a)?b$/.test("b")'); | |
| OLD | NEW |