]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_3/RegExp/perlstress-002.js
1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: NPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Netscape Public License
5 * Version 1.1 (the "License"); you may not use this file except in
6 * compliance with the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/NPL/
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
14 * The Original Code is JavaScript Engine testing utilities.
16 * The Initial Developer of the Original Code is Netscape Communications Corp.
17 * Portions created by the Initial Developer are Copyright (C) 2002
18 * the Initial Developer. All Rights Reserved.
20 * Contributor(s): pschwartau@netscape.com, rogerl@netscape.com
22 * Alternatively, the contents of this file may be used under the terms of
23 * either the GNU General Public License Version 2 or later (the "GPL"), or
24 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
25 * in which case the provisions of the GPL or the LGPL are applicable instead
26 * of those above. If you wish to allow use of your version of this file only
27 * under the terms of either the GPL or the LGPL, and not to allow others to
28 * use your version of this file under the terms of the NPL, indicate your
29 * decision by deleting the provisions above and replace them with the notice
30 * and other provisions required by the GPL or the LGPL. If you do not delete
31 * the provisions above, a recipient may use your version of this file under
32 * the terms of any one of the NPL, the GPL or the LGPL.
34 * ***** END LICENSE BLOCK *****
38 * SUMMARY: Testing JS RegExp engine against Perl 5 RegExp engine.
39 * Adjust cnLBOUND, cnUBOUND below to restrict which sections are tested.
41 * This test was created by running various patterns and strings through the
42 * Perl 5 RegExp engine. We saved the results below to test the JS engine.
44 * Each of the examples below is a negative test; that is, each produces a
45 * null match in Perl. Thus we set |expectedmatch| = |null| in each section.
47 * NOTE: ECMA/JS and Perl do differ on certain points. We have either commented
48 * out such sections altogether, or modified them to fit what we expect from JS.
52 * - ECMA does support (?: (?= and (?! operators, but doesn't support (?< etc.
54 * - ECMA doesn't support (?(condition)
57 //-----------------------------------------------------------------------------
60 var summary
= 'Testing regular expression edge cases';
61 var cnSingleSpace
= ' ';
63 var statusmessages
= new Array();
65 var patterns
= new Array();
67 var strings
= new Array();
69 var actualmatches
= new Array();
70 var expectedmatch
= '';
71 var expectedmatches
= new Array();
76 status
= inSection(1);
79 actualmatch
= string
.match(pattern
);
83 status
= inSection(2);
86 actualmatch
= string
.match(pattern
);
90 status
= inSection(3);
93 actualmatch
= string
.match(pattern
);
97 status
= inSection(4);
100 actualmatch
= string
.match(pattern
);
101 expectedmatch
= null;
104 status
= inSection(5);
107 actualmatch
= string
.match(pattern
);
108 expectedmatch
= null;
111 status
= inSection(6);
112 pattern
= /ab{1,}bc/;
114 actualmatch
= string
.match(pattern
);
115 expectedmatch
= null;
118 status
= inSection(7);
119 pattern
= /ab{4,5}bc/;
121 actualmatch
= string
.match(pattern
);
122 expectedmatch
= null;
125 status
= inSection(8);
128 actualmatch
= string
.match(pattern
);
129 expectedmatch
= null;
132 status
= inSection(9);
135 actualmatch
= string
.match(pattern
);
136 expectedmatch
= null;
139 status
= inSection(10);
142 actualmatch
= string
.match(pattern
);
143 expectedmatch
= null;
146 status
= inSection(11);
149 actualmatch
= string
.match(pattern
);
150 expectedmatch
= null;
153 status
= inSection(12);
156 actualmatch
= string
.match(pattern
);
157 expectedmatch
= null;
160 status
= inSection(13);
163 actualmatch
= string
.match(pattern
);
164 expectedmatch
= null;
167 status
= inSection(14);
170 actualmatch
= string
.match(pattern
);
171 expectedmatch
= null;
174 status
= inSection(15);
177 actualmatch
= string
.match(pattern
);
178 expectedmatch
= null;
181 status
= inSection(16);
184 actualmatch
= string
.match(pattern
);
185 expectedmatch
= null;
188 status
= inSection(17);
191 actualmatch
= string
.match(pattern
);
192 expectedmatch
= null;
195 status
= inSection(18);
198 actualmatch
= string
.match(pattern
);
199 expectedmatch
= null;
202 status
= inSection(19);
205 actualmatch
= string
.match(pattern
);
206 expectedmatch
= null;
209 status
= inSection(20);
212 actualmatch
= string
.match(pattern
);
213 expectedmatch
= null;
216 status
= inSection(21);
219 actualmatch
= string
.match(pattern
);
220 expectedmatch
= null;
223 status
= inSection(22);
226 actualmatch
= string
.match(pattern
);
227 expectedmatch
= null;
230 status
= inSection(23);
233 actualmatch
= string
.match(pattern
);
234 expectedmatch
= null;
237 status
= inSection(24);
240 actualmatch
= string
.match(pattern
);
241 expectedmatch
= null;
244 status
= inSection(25);
247 actualmatch
= string
.match(pattern
);
248 expectedmatch
= null;
251 status
= inSection(26);
254 actualmatch
= string
.match(pattern
);
255 expectedmatch
= null;
258 status
= inSection(27);
261 actualmatch
= string
.match(pattern
);
262 expectedmatch
= null;
265 status
= inSection(28);
268 actualmatch
= string
.match(pattern
);
269 expectedmatch
= null;
272 status
= inSection(29);
275 actualmatch
= string
.match(pattern
);
276 expectedmatch
= null;
279 status
= inSection(30);
282 actualmatch
= string
.match(pattern
);
283 expectedmatch
= null;
286 status
= inSection(31);
289 actualmatch
= string
.match(pattern
);
290 expectedmatch
= null;
293 status
= inSection(32);
296 actualmatch
= string
.match(pattern
);
297 expectedmatch
= null;
300 status
= inSection(33);
303 actualmatch
= string
.match(pattern
);
304 expectedmatch
= null;
307 status
= inSection(34);
310 actualmatch
= string
.match(pattern
);
311 expectedmatch
= null;
314 status
= inSection(35);
315 pattern
= /^(ab|cd)e/;
317 actualmatch
= string
.match(pattern
);
318 expectedmatch
= null;
321 status
= inSection(36);
322 pattern
= /a[bcd]+dcdcde/;
324 actualmatch
= string
.match(pattern
);
325 expectedmatch
= null;
328 status
= inSection(37);
329 pattern
= /(bc+d$|ef*g.|h?i(j|k))/;
331 actualmatch
= string
.match(pattern
);
332 expectedmatch
= null;
335 status
= inSection(38);
336 pattern
= /(bc+d$|ef*g.|h?i(j|k))/;
338 actualmatch
= string
.match(pattern
);
339 expectedmatch
= null;
342 status
= inSection(39);
345 actualmatch
= string
.match(pattern
);
346 expectedmatch
= null;
349 // MODIFIED - ECMA has different rules for paren contents.
350 status
= inSection(40);
353 actualmatch
= string
.match(pattern
);
354 //expectedmatch = null;
355 expectedmatch
= Array("", undefined);
358 // MODIFIED - ECMA has different rules for paren contents.
359 status
= inSection(41);
360 pattern
= /((\3|b)\2(a)x)+/;
361 string
= 'aaxabxbaxbbx';
362 actualmatch
= string
.match(pattern
);
363 //expectedmatch = null;
364 expectedmatch
= Array("ax", "ax", "", "a");
367 status
= inSection(42);
370 actualmatch
= string
.match(pattern
);
371 expectedmatch
= null;
374 status
= inSection(43);
377 actualmatch
= string
.match(pattern
);
378 expectedmatch
= null;
381 status
= inSection(44);
384 actualmatch
= string
.match(pattern
);
385 expectedmatch
= null;
388 status
= inSection(45);
391 actualmatch
= string
.match(pattern
);
392 expectedmatch
= null;
395 status
= inSection(46);
398 actualmatch
= string
.match(pattern
);
399 expectedmatch
= null;
402 status
= inSection(47);
403 pattern
= /ab{1,}bc/i;
405 actualmatch
= string
.match(pattern
);
406 expectedmatch
= null;
409 status
= inSection(48);
410 pattern
= /ab{4,5}?bc/i;
412 actualmatch
= string
.match(pattern
);
413 expectedmatch
= null;
416 status
= inSection(49);
419 actualmatch
= string
.match(pattern
);
420 expectedmatch
= null;
423 status
= inSection(50);
426 actualmatch
= string
.match(pattern
);
427 expectedmatch
= null;
430 status
= inSection(51);
433 actualmatch
= string
.match(pattern
);
434 expectedmatch
= null;
437 status
= inSection(52);
440 actualmatch
= string
.match(pattern
);
441 expectedmatch
= null;
444 status
= inSection(53);
447 actualmatch
= string
.match(pattern
);
448 expectedmatch
= null;
451 status
= inSection(54);
452 pattern
= /a[b-d]e/i;
454 actualmatch
= string
.match(pattern
);
455 expectedmatch
= null;
458 status
= inSection(55);
459 pattern
= /a[^bc]d/i;
461 actualmatch
= string
.match(pattern
);
462 expectedmatch
= null;
465 status
= inSection(56);
466 pattern
= /a[^-b]c/i;
468 actualmatch
= string
.match(pattern
);
469 expectedmatch
= null;
472 status
= inSection(57);
473 pattern
= /a[^]b]c/i;
475 actualmatch
= string
.match(pattern
);
476 expectedmatch
= null;
479 status
= inSection(58);
482 actualmatch
= string
.match(pattern
);
483 expectedmatch
= null;
486 status
= inSection(59);
487 pattern
= /^(ab|cd)e/i;
489 actualmatch
= string
.match(pattern
);
490 expectedmatch
= null;
493 status
= inSection(60);
494 pattern
= /a[bcd]+dcdcde/i;
496 actualmatch
= string
.match(pattern
);
497 expectedmatch
= null;
500 status
= inSection(61);
501 pattern
= /(bc+d$|ef*g.|h?i(j|k))/i;
503 actualmatch
= string
.match(pattern
);
504 expectedmatch
= null;
507 status
= inSection(62);
508 pattern
= /(bc+d$|ef*g.|h?i(j|k))/i;
510 actualmatch
= string
.match(pattern
);
511 expectedmatch
= null;
514 status
= inSection(63);
517 actualmatch
= string
.match(pattern
);
518 expectedmatch
= null;
521 status
= inSection(64);
522 pattern
= /^(a\1?){4}$/;
523 string
= 'aaaaaaaaa';
524 actualmatch
= string
.match(pattern
);
525 expectedmatch
= null;
528 status
= inSection(65);
529 pattern
= /^(a\1?){4}$/;
530 string
= 'aaaaaaaaaaa';
531 actualmatch
= string
.match(pattern
);
532 expectedmatch
= null;
535 /* ECMA doesn't support (?(
536 status = inSection(66);
537 pattern = /^(a(?(1)\1)){4}$/;
538 string = 'aaaaaaaaa';
539 actualmatch = string.match(pattern);
540 expectedmatch = null;
543 status = inSection(67);
544 pattern = /^(a(?(1)\1)){4}$/;
545 string = 'aaaaaaaaaaa';
546 actualmatch = string.match(pattern);
547 expectedmatch = null;
551 /* ECMA doesn't support (?<
552 status = inSection(68);
555 actualmatch = string.match(pattern);
556 expectedmatch = null;
559 status = inSection(69);
562 actualmatch = string.match(pattern);
563 expectedmatch = null;
566 status = inSection(70);
569 actualmatch = string.match(pattern);
570 expectedmatch = null;
574 /* ECMA doesn't support (?(condition)
575 status = inSection(71);
576 pattern = /(?:(?i)a)b/;
578 actualmatch = string.match(pattern);
579 expectedmatch = null;
582 status = inSection(72);
583 pattern = /((?i)a)b/;
585 actualmatch = string.match(pattern);
586 expectedmatch = null;
589 status = inSection(73);
592 actualmatch = string.match(pattern);
593 expectedmatch = null;
596 status = inSection(74);
597 pattern = /((?i:a))b/;
599 actualmatch = string.match(pattern);
600 expectedmatch = null;
603 status = inSection(75);
604 pattern = /(?:(?-i)a)b/i;
606 actualmatch = string.match(pattern);
607 expectedmatch = null;
610 status = inSection(76);
611 pattern = /((?-i)a)b/i;
613 actualmatch = string.match(pattern);
614 expectedmatch = null;
617 status = inSection(77);
618 pattern = /(?:(?-i)a)b/i;
620 actualmatch = string.match(pattern);
621 expectedmatch = null;
624 status = inSection(78);
625 pattern = /((?-i)a)b/i;
627 actualmatch = string.match(pattern);
628 expectedmatch = null;
631 status = inSection(79);
632 pattern = /(?-i:a)b/i;
634 actualmatch = string.match(pattern);
635 expectedmatch = null;
638 status = inSection(80);
639 pattern = /((?-i:a))b/i;
641 actualmatch = string.match(pattern);
642 expectedmatch = null;
645 status = inSection(81);
646 pattern = /(?-i:a)b/i;
648 actualmatch = string.match(pattern);
649 expectedmatch = null;
652 status = inSection(82);
653 pattern = /((?-i:a))b/i;
655 actualmatch = string.match(pattern);
656 expectedmatch = null;
659 status = inSection(83);
660 pattern = /((?-i:a.))b/i;
662 actualmatch = string.match(pattern);
663 expectedmatch = null;
666 status = inSection(84);
667 pattern = /((?s-i:a.))b/i;
669 actualmatch = string.match(pattern);
670 expectedmatch = null;
674 /* ECMA doesn't support (?<
675 status = inSection(85);
676 pattern = /(?<![cd])b/;
678 actualmatch = string.match(pattern);
679 expectedmatch = null;
682 status = inSection(86);
683 pattern = /(?<!(c|d))b/;
685 actualmatch = string.match(pattern);
686 expectedmatch = null;
690 status
= inSection(87);
691 pattern
= /^(?:a?b?)*$/;
693 actualmatch
= string
.match(pattern
);
694 expectedmatch
= null;
697 status
= inSection(88);
699 string
= 'a\nb\nc\n';
700 actualmatch
= string
.match(pattern
);
701 expectedmatch
= null;
704 status
= inSection(89);
706 string
= 'a\nb\nc\n';
707 actualmatch
= string
.match(pattern
);
708 expectedmatch
= null;
711 /* ECMA doesn't support (?(
712 status = inSection(90);
713 pattern = /(?(1)a|b)/;
715 actualmatch = string.match(pattern);
716 expectedmatch = null;
719 status = inSection(91);
720 pattern = /(x)?(?(1)a|b)/;
722 actualmatch = string.match(pattern);
723 expectedmatch = null;
726 status = inSection(92);
727 pattern = /()(?(1)b|a)/;
729 actualmatch = string.match(pattern);
730 expectedmatch = null;
733 status = inSection(93);
734 pattern = /^(\()?blah(?(1)(\)))$/;
736 actualmatch = string.match(pattern);
737 expectedmatch = null;
740 status = inSection(94);
741 pattern = /^(\()?blah(?(1)(\)))$/;
743 actualmatch = string.match(pattern);
744 expectedmatch = null;
747 status = inSection(95);
748 pattern = /^(\(+)?blah(?(1)(\)))$/;
750 actualmatch = string.match(pattern);
751 expectedmatch = null;
754 status = inSection(96);
755 pattern = /^(\(+)?blah(?(1)(\)))$/;
757 actualmatch = string.match(pattern);
758 expectedmatch = null;
761 status = inSection(97);
762 pattern = /(?(?{0})a|b)/;
764 actualmatch = string.match(pattern);
765 expectedmatch = null;
768 status = inSection(98);
769 pattern = /(?(?{1})b|a)/;
771 actualmatch = string.match(pattern);
772 expectedmatch = null;
775 status = inSection(99);
776 pattern = /(?(?!a)a|b)/;
778 actualmatch = string.match(pattern);
779 expectedmatch = null;
782 status = inSection(100);
783 pattern = /(?(?=a)b|a)/;
785 actualmatch = string.match(pattern);
786 expectedmatch = null;
790 status
= inSection(101);
791 pattern
= /^(?=(a+?))\1ab/;
793 actualmatch
= string
.match(pattern
);
794 expectedmatch
= null;
797 status
= inSection(102);
798 pattern
= /^(?=(a+?))\1ab/;
800 actualmatch
= string
.match(pattern
);
801 expectedmatch
= null;
804 status
= inSection(103);
805 pattern
= /([\w:]+::)?(\w+)$/;
807 actualmatch
= string
.match(pattern
);
808 expectedmatch
= null;
811 status
= inSection(104);
812 pattern
= /([\w:]+::)?(\w+)$/;
814 actualmatch
= string
.match(pattern
);
815 expectedmatch
= null;
818 status
= inSection(105);
821 actualmatch
= string
.match(pattern
);
822 expectedmatch
= null;
825 status
= inSection(106);
828 actualmatch
= string
.match(pattern
);
829 expectedmatch
= null;
832 status
= inSection(107);
835 actualmatch
= string
.match(pattern
);
836 expectedmatch
= null;
839 status
= inSection(108);
842 actualmatch
= string
.match(pattern
);
843 expectedmatch
= null;
846 status
= inSection(109);
849 actualmatch
= string
.match(pattern
);
850 expectedmatch
= null;
853 status
= inSection(110);
856 actualmatch
= string
.match(pattern
);
857 expectedmatch
= null;
860 status
= inSection(111);
863 actualmatch
= string
.match(pattern
);
864 expectedmatch
= null;
867 status
= inSection(112);
870 actualmatch
= string
.match(pattern
);
871 expectedmatch
= null;
874 status
= inSection(113);
877 actualmatch
= string
.match(pattern
);
878 expectedmatch
= null;
881 status
= inSection(114);
884 actualmatch
= string
.match(pattern
);
885 expectedmatch
= null;
888 status
= inSection(115);
891 actualmatch
= string
.match(pattern
);
892 expectedmatch
= null;
895 status
= inSection(116);
898 actualmatch
= string
.match(pattern
);
899 expectedmatch
= null;
902 status
= inSection(117);
905 actualmatch
= string
.match(pattern
);
906 expectedmatch
= null;
909 status
= inSection(118);
912 actualmatch
= string
.match(pattern
);
913 expectedmatch
= null;
916 status
= inSection(119);
919 actualmatch
= string
.match(pattern
);
920 expectedmatch
= null;
923 status
= inSection(120);
926 actualmatch
= string
.match(pattern
);
927 expectedmatch
= null;
930 status
= inSection(121);
933 actualmatch
= string
.match(pattern
);
934 expectedmatch
= null;
937 status
= inSection(122);
940 actualmatch
= string
.match(pattern
);
941 expectedmatch
= null;
944 status
= inSection(123);
947 actualmatch
= string
.match(pattern
);
948 expectedmatch
= null;
951 status
= inSection(124);
954 actualmatch
= string
.match(pattern
);
955 expectedmatch
= null;
958 status
= inSection(125);
961 actualmatch
= string
.match(pattern
);
962 expectedmatch
= null;
965 status
= inSection(126);
968 actualmatch
= string
.match(pattern
);
969 expectedmatch
= null;
972 status
= inSection(127);
975 actualmatch
= string
.match(pattern
);
976 expectedmatch
= null;
979 status
= inSection(128);
982 actualmatch
= string
.match(pattern
);
983 expectedmatch
= null;
986 status
= inSection(129);
989 actualmatch
= string
.match(pattern
);
990 expectedmatch
= null;
993 status
= inSection(130);
996 actualmatch
= string
.match(pattern
);
997 expectedmatch
= null;
1000 status
= inSection(131);
1003 actualmatch
= string
.match(pattern
);
1004 expectedmatch
= null;
1007 status
= inSection(132);
1010 actualmatch
= string
.match(pattern
);
1011 expectedmatch
= null;
1014 status
= inSection(133);
1017 actualmatch
= string
.match(pattern
);
1018 expectedmatch
= null;
1021 status
= inSection(134);
1024 actualmatch
= string
.match(pattern
);
1025 expectedmatch
= null;
1028 status
= inSection(135);
1031 actualmatch
= string
.match(pattern
);
1032 expectedmatch
= null;
1035 status
= inSection(136);
1038 actualmatch
= string
.match(pattern
);
1039 expectedmatch
= null;
1042 status
= inSection(137);
1045 actualmatch
= string
.match(pattern
);
1046 expectedmatch
= null;
1049 status
= inSection(138);
1052 actualmatch
= string
.match(pattern
);
1053 expectedmatch
= null;
1056 status
= inSection(139);
1059 actualmatch
= string
.match(pattern
);
1060 expectedmatch
= null;
1063 status
= inSection(140);
1066 actualmatch
= string
.match(pattern
);
1067 expectedmatch
= null;
1070 status
= inSection(141);
1073 actualmatch
= string
.match(pattern
);
1074 expectedmatch
= null;
1077 status
= inSection(142);
1080 actualmatch
= string
.match(pattern
);
1081 expectedmatch
= null;
1084 status
= inSection(143);
1087 actualmatch
= string
.match(pattern
);
1088 expectedmatch
= null;
1091 status
= inSection(144);
1094 actualmatch
= string
.match(pattern
);
1095 expectedmatch
= null;
1098 status
= inSection(145);
1101 actualmatch
= string
.match(pattern
);
1102 expectedmatch
= null;
1105 status
= inSection(146);
1108 actualmatch
= string
.match(pattern
);
1109 expectedmatch
= null;
1112 status
= inSection(147);
1115 actualmatch
= string
.match(pattern
);
1116 expectedmatch
= null;
1119 status
= inSection(148);
1122 actualmatch
= string
.match(pattern
);
1123 expectedmatch
= null;
1126 status
= inSection(149);
1129 actualmatch
= string
.match(pattern
);
1130 expectedmatch
= null;
1133 status
= inSection(150);
1136 actualmatch
= string
.match(pattern
);
1137 expectedmatch
= null;
1140 status
= inSection(151);
1143 actualmatch
= string
.match(pattern
);
1144 expectedmatch
= null;
1147 status
= inSection(152);
1150 actualmatch
= string
.match(pattern
);
1151 expectedmatch
= null;
1154 status
= inSection(153);
1157 actualmatch
= string
.match(pattern
);
1158 expectedmatch
= null;
1161 status
= inSection(154);
1164 actualmatch
= string
.match(pattern
);
1165 expectedmatch
= null;
1168 status
= inSection(155);
1171 actualmatch
= string
.match(pattern
);
1172 expectedmatch
= null;
1175 status
= inSection(156);
1178 actualmatch
= string
.match(pattern
);
1179 expectedmatch
= null;
1182 status
= inSection(157);
1185 actualmatch
= string
.match(pattern
);
1186 expectedmatch
= null;
1189 status
= inSection(158);
1192 actualmatch
= string
.match(pattern
);
1193 expectedmatch
= null;
1196 status
= inSection(159);
1199 actualmatch
= string
.match(pattern
);
1200 expectedmatch
= null;
1203 status
= inSection(160);
1206 actualmatch
= string
.match(pattern
);
1207 expectedmatch
= null;
1210 status
= inSection(161);
1213 actualmatch
= string
.match(pattern
);
1214 expectedmatch
= null;
1217 status
= inSection(162);
1220 actualmatch
= string
.match(pattern
);
1221 expectedmatch
= null;
1224 status
= inSection(163);
1227 actualmatch
= string
.match(pattern
);
1228 expectedmatch
= null;
1231 status
= inSection(164);
1234 actualmatch
= string
.match(pattern
);
1235 expectedmatch
= null;
1238 status
= inSection(165);
1241 actualmatch
= string
.match(pattern
);
1242 expectedmatch
= null;
1245 status
= inSection(166);
1248 actualmatch
= string
.match(pattern
);
1249 expectedmatch
= null;
1252 status
= inSection(167);
1255 actualmatch
= string
.match(pattern
);
1256 expectedmatch
= null;
1259 status
= inSection(168);
1262 actualmatch
= string
.match(pattern
);
1263 expectedmatch
= null;
1266 status
= inSection(169);
1269 actualmatch
= string
.match(pattern
);
1270 expectedmatch
= null;
1273 status
= inSection(170);
1276 actualmatch
= string
.match(pattern
);
1277 expectedmatch
= null;
1280 status
= inSection(171);
1283 actualmatch
= string
.match(pattern
);
1284 expectedmatch
= null;
1287 status
= inSection(172);
1290 actualmatch
= string
.match(pattern
);
1291 expectedmatch
= null;
1294 status
= inSection(173);
1297 actualmatch
= string
.match(pattern
);
1298 expectedmatch
= null;
1301 status
= inSection(174);
1304 actualmatch
= string
.match(pattern
);
1305 expectedmatch
= null;
1308 status
= inSection(175);
1311 actualmatch
= string
.match(pattern
);
1312 expectedmatch
= null;
1315 status
= inSection(176);
1318 actualmatch
= string
.match(pattern
);
1319 expectedmatch
= null;
1322 status
= inSection(177);
1325 actualmatch
= string
.match(pattern
);
1326 expectedmatch
= null;
1329 status
= inSection(178);
1332 actualmatch
= string
.match(pattern
);
1333 expectedmatch
= null;
1336 status
= inSection(179);
1339 actualmatch
= string
.match(pattern
);
1340 expectedmatch
= null;
1343 status
= inSection(180);
1346 actualmatch
= string
.match(pattern
);
1347 expectedmatch
= null;
1350 status
= inSection(181);
1353 actualmatch
= string
.match(pattern
);
1354 expectedmatch
= null;
1357 status
= inSection(182);
1360 actualmatch
= string
.match(pattern
);
1361 expectedmatch
= null;
1364 status
= inSection(183);
1367 actualmatch
= string
.match(pattern
);
1368 expectedmatch
= null;
1371 status
= inSection(184);
1374 actualmatch
= string
.match(pattern
);
1375 expectedmatch
= null;
1378 status
= inSection(185);
1381 actualmatch
= string
.match(pattern
);
1382 expectedmatch
= null;
1385 status
= inSection(186);
1388 actualmatch
= string
.match(pattern
);
1389 expectedmatch
= null;
1392 status
= inSection(187);
1395 actualmatch
= string
.match(pattern
);
1396 expectedmatch
= null;
1399 status
= inSection(188);
1402 actualmatch
= string
.match(pattern
);
1403 expectedmatch
= null;
1406 status
= inSection(189);
1409 actualmatch
= string
.match(pattern
);
1410 expectedmatch
= null;
1413 status
= inSection(190);
1416 actualmatch
= string
.match(pattern
);
1417 expectedmatch
= null;
1420 status
= inSection(191);
1423 actualmatch
= string
.match(pattern
);
1424 expectedmatch
= null;
1427 status
= inSection(192);
1430 actualmatch
= string
.match(pattern
);
1431 expectedmatch
= null;
1434 status
= inSection(193);
1437 actualmatch
= string
.match(pattern
);
1438 expectedmatch
= null;
1441 status
= inSection(194);
1444 actualmatch
= string
.match(pattern
);
1445 expectedmatch
= null;
1448 status
= inSection(195);
1451 actualmatch
= string
.match(pattern
);
1452 expectedmatch
= null;
1455 status
= inSection(196);
1457 string
= 'abb\nb\n';
1458 actualmatch
= string
.match(pattern
);
1459 expectedmatch
= null;
1462 status
= inSection(197);
1464 string
= 'abb\nb\n';
1465 actualmatch
= string
.match(pattern
);
1466 expectedmatch
= null;
1469 status
= inSection(198);
1471 string
= 'abb\nb\n';
1472 actualmatch
= string
.match(pattern
);
1473 expectedmatch
= null;
1476 status
= inSection(199);
1478 string
= 'b\nabb\n';
1479 actualmatch
= string
.match(pattern
);
1480 expectedmatch
= null;
1483 status
= inSection(200);
1485 string
= 'abb\nb\n';
1486 actualmatch
= string
.match(pattern
);
1487 expectedmatch
= null;
1490 status
= inSection(201);
1492 string
= 'b\nabb\n';
1493 actualmatch
= string
.match(pattern
);
1494 expectedmatch
= null;
1497 status
= inSection(202);
1500 actualmatch
= string
.match(pattern
);
1501 expectedmatch
= null;
1504 status
= inSection(203);
1507 actualmatch
= string
.match(pattern
);
1508 expectedmatch
= null;
1511 status
= inSection(204);
1514 actualmatch
= string
.match(pattern
);
1515 expectedmatch
= null;
1518 status
= inSection(205);
1521 actualmatch
= string
.match(pattern
);
1522 expectedmatch
= null;
1525 status
= inSection(206);
1528 actualmatch
= string
.match(pattern
);
1529 expectedmatch
= null;
1532 status
= inSection(207);
1535 actualmatch
= string
.match(pattern
);
1536 expectedmatch
= null;
1539 status
= inSection(208);
1542 actualmatch
= string
.match(pattern
);
1543 expectedmatch
= null;
1546 status
= inSection(209);
1549 actualmatch
= string
.match(pattern
);
1550 expectedmatch
= null;
1553 status
= inSection(210);
1556 actualmatch
= string
.match(pattern
);
1557 expectedmatch
= null;
1560 status
= inSection(211);
1563 actualmatch
= string
.match(pattern
);
1564 expectedmatch
= null;
1567 status
= inSection(212);
1570 actualmatch
= string
.match(pattern
);
1571 expectedmatch
= null;
1574 status
= inSection(213);
1577 actualmatch
= string
.match(pattern
);
1578 expectedmatch
= null;
1581 status
= inSection(214);
1584 actualmatch
= string
.match(pattern
);
1585 expectedmatch
= null;
1588 status
= inSection(215);
1591 actualmatch
= string
.match(pattern
);
1592 expectedmatch
= null;
1595 status
= inSection(216);
1598 actualmatch
= string
.match(pattern
);
1599 expectedmatch
= null;
1602 status
= inSection(217);
1605 actualmatch
= string
.match(pattern
);
1606 expectedmatch
= null;
1609 status
= inSection(218);
1612 actualmatch
= string
.match(pattern
);
1613 expectedmatch
= null;
1616 status
= inSection(219);
1619 actualmatch
= string
.match(pattern
);
1620 expectedmatch
= null;
1623 status
= inSection(220);
1626 actualmatch
= string
.match(pattern
);
1627 expectedmatch
= null;
1630 status
= inSection(221);
1633 actualmatch
= string
.match(pattern
);
1634 expectedmatch
= null;
1637 status
= inSection(222);
1640 actualmatch
= string
.match(pattern
);
1641 expectedmatch
= null;
1644 status
= inSection(223);
1647 actualmatch
= string
.match(pattern
);
1648 expectedmatch
= null;
1651 status
= inSection(224);
1654 actualmatch
= string
.match(pattern
);
1655 expectedmatch
= null;
1658 status
= inSection(225);
1661 actualmatch
= string
.match(pattern
);
1662 expectedmatch
= null;
1665 status
= inSection(226);
1668 actualmatch
= string
.match(pattern
);
1669 expectedmatch
= null;
1672 status
= inSection(227);
1675 actualmatch
= string
.match(pattern
);
1676 expectedmatch
= null;
1679 status
= inSection(228);
1682 actualmatch
= string
.match(pattern
);
1683 expectedmatch
= null;
1686 status
= inSection(229);
1689 actualmatch
= string
.match(pattern
);
1690 expectedmatch
= null;
1693 status
= inSection(230);
1696 actualmatch
= string
.match(pattern
);
1697 expectedmatch
= null;
1700 status
= inSection(231);
1703 actualmatch
= string
.match(pattern
);
1704 expectedmatch
= null;
1707 status
= inSection(232);
1710 actualmatch
= string
.match(pattern
);
1711 expectedmatch
= null;
1714 status
= inSection(233);
1717 actualmatch
= string
.match(pattern
);
1718 expectedmatch
= null;
1721 status
= inSection(234);
1724 actualmatch
= string
.match(pattern
);
1725 expectedmatch
= null;
1728 status
= inSection(235);
1731 actualmatch
= string
.match(pattern
);
1732 expectedmatch
= null;
1735 status
= inSection(236);
1738 actualmatch
= string
.match(pattern
);
1739 expectedmatch
= null;
1742 status
= inSection(237);
1745 actualmatch
= string
.match(pattern
);
1746 expectedmatch
= null;
1749 status
= inSection(238);
1750 pattern
= /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/;
1752 actualmatch
= string
.match(pattern
);
1753 expectedmatch
= null;
1756 status
= inSection(239);
1759 actualmatch
= string
.match(pattern
);
1760 expectedmatch
= null;
1763 status
= inSection(240);
1764 pattern
= /\.c(pp|xx|c)?$/i;
1766 actualmatch
= string
.match(pattern
);
1767 expectedmatch
= null;
1770 status
= inSection(241);
1771 pattern
= /^([a-z]:)/;
1773 actualmatch
= string
.match(pattern
);
1774 expectedmatch
= null;
1777 status
= inSection(242);
1778 pattern
= /(\w)?(abc)\1b/;
1780 actualmatch
= string
.match(pattern
);
1781 expectedmatch
= null;
1784 /* ECMA doesn't support (?(
1785 status = inSection(243);
1786 pattern = /^(a)?(?(1)a|b)+$/;
1788 actualmatch = string.match(pattern);
1789 expectedmatch = null;
1795 //-----------------------------------------------------------------------------
1797 //-----------------------------------------------------------------------------
1803 if(omitCurrentSection())
1806 statusmessages
[i
] = status
;
1807 patterns
[i
] = pattern
;
1808 strings
[i
] = string
;
1809 actualmatches
[i
] = actualmatch
;
1810 expectedmatches
[i
] = expectedmatch
;
1815 function omitCurrentSection()
1819 // current section number is in global status variable
1820 var n
= status
.match(/(\d+)/)[1];
1821 return ((n
< cnLBOUND
) || (n
> cnUBOUND
));
1833 printBugNumber (bug
);
1834 printStatus (summary
);
1835 testRegExp(statusmessages
, patterns
, strings
, actualmatches
, expectedmatches
);