Sign in
webkit
/
WebKit
/
2bde0edf56b50cba234b331b5ddd67eb5d2a0a71
/
.
/
LayoutTests
/
fast
/
regex
/
script-tests
/
alternative-length-miscalculation.js
blob: b674aa6423195320524a2f4653430833887ccd45 [
file
] [
log
] [
blame
]
description
(
"This page tests for length miscalculations in regular expression processing."
);
var
re
=
/b|[^b]/
g
;
re
.
lastIndex
=
1
;
shouldBe
(
"re.exec('a')"
,
"null"
);
var
re2
=
/[^a]|ab/
;
shouldBe
(
"re2.test('')"
,
"false"
);