Changeset 28395 in webkit for trunk/LayoutTests/fast/js/resources/regexp-overflow.js
- Timestamp:
- Dec 4, 2007, 11:08:28 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/fast/js/resources/regexp-overflow.js
r28058 r28395 1 1 description( 2 'Tests some regular expressions with braces in themthat used to overflow the regular expression compilation preflight computation.'2 'Tests some regular expressions that used to overflow the regular expression compilation preflight computation.' 3 3 ); 4 4 5 5 shouldBe('/(\\d)(\\1{1})/.exec("11").toString()', '"11,1,1"'); 6 6 7 shouldBe('/^(\\d{1,2})([ -:\\/\\.]{1})(\\d{1,2})(\\2{1})?(\\d{2,4})?$/.exec("1:1").toString()', '"1:1,1,:,1,,"'); 7 shouldBe('/^(\\d{4})([ -:\\/\\.]{1})(\\d{1,2})(\\2{1})(\\d{1,2})T(\\d{1,2})([ -:\\/\\.]{1})(\\d{1,2})(\\7{1})(\\d{1,2})Z$/.exec("1234:5:6T7/8/9Z").toString()', '"1234:5:6T7/8/9Z,1234,:,5,:,6,7,/,8,/,9"'); 8 9 shouldBe('/^(\\d{4})([ -:\\/\\.]{1})(\\d{1,2})(\\2{1})(\\d{1,2})T(\\d{1,2})([ -:\\/\\.]{1})(\\d{1,2})(\\7{1})(\\d{1,2})Z$/.exec("1234:5:6T7/8/9Z").toString()', 10 '"1234:5:6T7/8/9Z,1234,:,5,:,6,7,/,8,/,9"'); 11 12 shouldBe('/\\[["\'\\s]{0,1}([\\w-]*)["\'\\s]{0,1}([\\W]{0,1}=){0,2}["\'\\s]{0,1}([\\w-]*)["\'\\s]{0,1}\\]$/.exec("[]").toString()', 13 '"[],,,"'); 14 15 shouldBe('/(x){0,2}/.exec("").toString()', '","'); 8 16 9 17 debug('');
Note:
See TracChangeset
for help on using the changeset viewer.