blob: d8f4b4de94b5c01a19c5977561fa521c71bc3650 (
plain)
1
2
3
4
5
6
7
8
9
10
|
function test() {
var re = /abc(.+)z/;
for (var i = 0; i < 100; i++) {
assertEq(re.exec(newRope("abcd", "xyz"))[1], "dxy");
assertEq(re.test(newRope("abcd", "xyz")), true);
assertEq(re[Symbol.search](newRope(".abcd", "xyz")), 1);
assertEq(re[Symbol.match](newRope("abcd", "xyz"))[1], "dxy");
}
}
test();
|