1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is JavaScript Engine testing utilities.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corp.
19 * Portions created by the Initial Developer are Copyright (C) 2002
20 * the Initial Developer. All Rights Reserved.
23 * pschwartau@netscape.com, rogerl@netscape.com
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
42 * SUMMARY: Testing JS RegExp engine against Perl 5 RegExp engine.
43 * Adjust cnLBOUND, cnUBOUND below to restrict which sections are tested.
45 * This test was created by running various patterns and strings through the
46 * Perl 5 RegExp engine. We saved the results below to test the JS engine.
48 * Each of the examples below is a negative test; that is, each produces a
49 * null match in Perl. Thus we set |expectedmatch| = |null| in each section.
51 * NOTE: ECMA/JS and Perl do differ on certain points. We have either commented
52 * out such sections altogether, or modified them to fit what we expect from JS.
56 * - ECMA does support (?: (?= and (?! operators, but doesn't support (?< etc.
58 * - ECMA doesn't support (?(condition)
61 //-----------------------------------------------------------------------------
63 var BUGNUMBER = 85721;
64 var summary = 'Testing regular expression edge cases';
65 var cnSingleSpace = ' ';
67 var statusmessages = new Array();
69 var patterns = new Array();
71 var strings = new Array();
73 var actualmatches = new Array();
74 var expectedmatch = '';
75 var expectedmatches = new Array();
80 status = inSection(1);
83 actualmatch = string.match(pattern);
87 status = inSection(2);
90 actualmatch = string.match(pattern);
94 status = inSection(3);
97 actualmatch = string.match(pattern);
101 status = inSection(4);
104 actualmatch = string.match(pattern);
105 expectedmatch = null;
108 status = inSection(5);
111 actualmatch = string.match(pattern);
112 expectedmatch = null;
115 status = inSection(6);
116 pattern = /ab{1,}bc/;
118 actualmatch = string.match(pattern);
119 expectedmatch = null;
122 status = inSection(7);
123 pattern = /ab{4,5}bc/;
125 actualmatch = string.match(pattern);
126 expectedmatch = null;
129 status = inSection(8);
132 actualmatch = string.match(pattern);
133 expectedmatch = null;
136 status = inSection(9);
139 actualmatch = string.match(pattern);
140 expectedmatch = null;
143 status = inSection(10);
146 actualmatch = string.match(pattern);
147 expectedmatch = null;
150 status = inSection(11);
153 actualmatch = string.match(pattern);
154 expectedmatch = null;
157 status = inSection(12);
160 actualmatch = string.match(pattern);
161 expectedmatch = null;
164 status = inSection(13);
167 actualmatch = string.match(pattern);
168 expectedmatch = null;
171 status = inSection(14);
174 actualmatch = string.match(pattern);
175 expectedmatch = null;
178 status = inSection(15);
181 actualmatch = string.match(pattern);
182 expectedmatch = null;
185 status = inSection(16);
188 actualmatch = string.match(pattern);
189 expectedmatch = null;
192 status = inSection(17);
195 actualmatch = string.match(pattern);
196 expectedmatch = null;
199 status = inSection(18);
202 actualmatch = string.match(pattern);
203 expectedmatch = null;
206 status = inSection(19);
209 actualmatch = string.match(pattern);
210 expectedmatch = null;
213 status = inSection(20);
216 actualmatch = string.match(pattern);
217 expectedmatch = null;
220 status = inSection(21);
223 actualmatch = string.match(pattern);
224 expectedmatch = null;
227 status = inSection(22);
230 actualmatch = string.match(pattern);
231 expectedmatch = null;
234 status = inSection(23);
237 actualmatch = string.match(pattern);
238 expectedmatch = null;
241 status = inSection(24);
244 actualmatch = string.match(pattern);
245 expectedmatch = null;
248 status = inSection(25);
251 actualmatch = string.match(pattern);
252 expectedmatch = null;
255 status = inSection(26);
258 actualmatch = string.match(pattern);
259 expectedmatch = null;
262 status = inSection(27);
265 actualmatch = string.match(pattern);
266 expectedmatch = null;
269 status = inSection(28);
272 actualmatch = string.match(pattern);
273 expectedmatch = null;
276 status = inSection(29);
279 actualmatch = string.match(pattern);
280 expectedmatch = null;
283 status = inSection(30);
286 actualmatch = string.match(pattern);
287 expectedmatch = null;
290 status = inSection(31);
293 actualmatch = string.match(pattern);
294 expectedmatch = null;
297 status = inSection(32);
300 actualmatch = string.match(pattern);
301 expectedmatch = null;
304 status = inSection(33);
307 actualmatch = string.match(pattern);
308 expectedmatch = null;
311 status = inSection(34);
314 actualmatch = string.match(pattern);
315 expectedmatch = null;
318 status = inSection(35);
319 pattern = /^(ab|cd)e/;
321 actualmatch = string.match(pattern);
322 expectedmatch = null;
325 status = inSection(36);
326 pattern = /a[bcd]+dcdcde/;
328 actualmatch = string.match(pattern);
329 expectedmatch = null;
332 status = inSection(37);
333 pattern = /(bc+d$|ef*g.|h?i(j|k))/;
335 actualmatch = string.match(pattern);
336 expectedmatch = null;
339 status = inSection(38);
340 pattern = /(bc+d$|ef*g.|h?i(j|k))/;
342 actualmatch = string.match(pattern);
343 expectedmatch = null;
346 status = inSection(39);
349 actualmatch = string.match(pattern);
350 expectedmatch = null;
353 // MODIFIED - ECMA has different rules for paren contents.
354 status = inSection(40);
357 actualmatch = string.match(pattern);
358 //expectedmatch = null;
359 expectedmatch = Array("", undefined);
362 // MODIFIED - ECMA has different rules for paren contents.
363 status = inSection(41);
364 pattern = /((\3|b)\2(a)x)+/;
365 string = 'aaxabxbaxbbx';
366 actualmatch = string.match(pattern);
367 //expectedmatch = null;
368 expectedmatch = Array("ax", "ax", "", "a");
371 status = inSection(42);
374 actualmatch = string.match(pattern);
375 expectedmatch = null;
378 status = inSection(43);
381 actualmatch = string.match(pattern);
382 expectedmatch = null;
385 status = inSection(44);
388 actualmatch = string.match(pattern);
389 expectedmatch = null;
392 status = inSection(45);
395 actualmatch = string.match(pattern);
396 expectedmatch = null;
399 status = inSection(46);
402 actualmatch = string.match(pattern);
403 expectedmatch = null;
406 status = inSection(47);
407 pattern = /ab{1,}bc/i;
409 actualmatch = string.match(pattern);
410 expectedmatch = null;
413 status = inSection(48);
414 pattern = /ab{4,5}?bc/i;
416 actualmatch = string.match(pattern);
417 expectedmatch = null;
420 status = inSection(49);
423 actualmatch = string.match(pattern);
424 expectedmatch = null;
427 status = inSection(50);
430 actualmatch = string.match(pattern);
431 expectedmatch = null;
434 status = inSection(51);
437 actualmatch = string.match(pattern);
438 expectedmatch = null;
441 status = inSection(52);
444 actualmatch = string.match(pattern);
445 expectedmatch = null;
448 status = inSection(53);
451 actualmatch = string.match(pattern);
452 expectedmatch = null;
455 status = inSection(54);
456 pattern = /a[b-d]e/i;
458 actualmatch = string.match(pattern);
459 expectedmatch = null;
462 status = inSection(55);
463 pattern = /a[^bc]d/i;
465 actualmatch = string.match(pattern);
466 expectedmatch = null;
469 status = inSection(56);
470 pattern = /a[^-b]c/i;
472 actualmatch = string.match(pattern);
473 expectedmatch = null;
476 status = inSection(57);
477 pattern = /a[^]b]c/i;
479 actualmatch = string.match(pattern);
480 expectedmatch = null;
483 status = inSection(58);
486 actualmatch = string.match(pattern);
487 expectedmatch = null;
490 status = inSection(59);
491 pattern = /^(ab|cd)e/i;
493 actualmatch = string.match(pattern);
494 expectedmatch = null;
497 status = inSection(60);
498 pattern = /a[bcd]+dcdcde/i;
500 actualmatch = string.match(pattern);
501 expectedmatch = null;
504 status = inSection(61);
505 pattern = /(bc+d$|ef*g.|h?i(j|k))/i;
507 actualmatch = string.match(pattern);
508 expectedmatch = null;
511 status = inSection(62);
512 pattern = /(bc+d$|ef*g.|h?i(j|k))/i;
514 actualmatch = string.match(pattern);
515 expectedmatch = null;
518 status = inSection(63);
521 actualmatch = string.match(pattern);
522 expectedmatch = null;
525 status = inSection(64);
526 pattern = /^(a\1?){4}$/;
527 string = 'aaaaaaaaa';
528 actualmatch = string.match(pattern);
529 expectedmatch = null;
532 status = inSection(65);
533 pattern = /^(a\1?){4}$/;
534 string = 'aaaaaaaaaaa';
535 actualmatch = string.match(pattern);
536 expectedmatch = null;
539 /* ECMA doesn't support (?(
540 status = inSection(66);
541 pattern = /^(a(?(1)\1)){4}$/;
542 string = 'aaaaaaaaa';
543 actualmatch = string.match(pattern);
544 expectedmatch = null;
547 status = inSection(67);
548 pattern = /^(a(?(1)\1)){4}$/;
549 string = 'aaaaaaaaaaa';
550 actualmatch = string.match(pattern);
551 expectedmatch = null;
555 /* ECMA doesn't support (?<
556 status = inSection(68);
559 actualmatch = string.match(pattern);
560 expectedmatch = null;
563 status = inSection(69);
566 actualmatch = string.match(pattern);
567 expectedmatch = null;
570 status = inSection(70);
573 actualmatch = string.match(pattern);
574 expectedmatch = null;
578 /* ECMA doesn't support (?(condition)
579 status = inSection(71);
580 pattern = /(?:(?i)a)b/;
582 actualmatch = string.match(pattern);
583 expectedmatch = null;
586 status = inSection(72);
587 pattern = /((?i)a)b/;
589 actualmatch = string.match(pattern);
590 expectedmatch = null;
593 status = inSection(73);
596 actualmatch = string.match(pattern);
597 expectedmatch = null;
600 status = inSection(74);
601 pattern = /((?i:a))b/;
603 actualmatch = string.match(pattern);
604 expectedmatch = null;
607 status = inSection(75);
608 pattern = /(?:(?-i)a)b/i;
610 actualmatch = string.match(pattern);
611 expectedmatch = null;
614 status = inSection(76);
615 pattern = /((?-i)a)b/i;
617 actualmatch = string.match(pattern);
618 expectedmatch = null;
621 status = inSection(77);
622 pattern = /(?:(?-i)a)b/i;
624 actualmatch = string.match(pattern);
625 expectedmatch = null;
628 status = inSection(78);
629 pattern = /((?-i)a)b/i;
631 actualmatch = string.match(pattern);
632 expectedmatch = null;
635 status = inSection(79);
636 pattern = /(?-i:a)b/i;
638 actualmatch = string.match(pattern);
639 expectedmatch = null;
642 status = inSection(80);
643 pattern = /((?-i:a))b/i;
645 actualmatch = string.match(pattern);
646 expectedmatch = null;
649 status = inSection(81);
650 pattern = /(?-i:a)b/i;
652 actualmatch = string.match(pattern);
653 expectedmatch = null;
656 status = inSection(82);
657 pattern = /((?-i:a))b/i;
659 actualmatch = string.match(pattern);
660 expectedmatch = null;
663 status = inSection(83);
664 pattern = /((?-i:a.))b/i;
666 actualmatch = string.match(pattern);
667 expectedmatch = null;
670 status = inSection(84);
671 pattern = /((?s-i:a.))b/i;
673 actualmatch = string.match(pattern);
674 expectedmatch = null;
678 /* ECMA doesn't support (?<
679 status = inSection(85);
680 pattern = /(?<![cd])b/;
682 actualmatch = string.match(pattern);
683 expectedmatch = null;
686 status = inSection(86);
687 pattern = /(?<!(c|d))b/;
689 actualmatch = string.match(pattern);
690 expectedmatch = null;
694 status = inSection(87);
695 pattern = /^(?:a?b?)*$/;
697 actualmatch = string.match(pattern);
698 expectedmatch = null;
701 status = inSection(88);
703 string = 'a\nb\nc\n';
704 actualmatch = string.match(pattern);
705 expectedmatch = null;
708 status = inSection(89);
710 string = 'a\nb\nc\n';
711 actualmatch = string.match(pattern);
712 expectedmatch = null;
715 /* ECMA doesn't support (?(
716 status = inSection(90);
717 pattern = /(?(1)a|b)/;
719 actualmatch = string.match(pattern);
720 expectedmatch = null;
723 status = inSection(91);
724 pattern = /(x)?(?(1)a|b)/;
726 actualmatch = string.match(pattern);
727 expectedmatch = null;
730 status = inSection(92);
731 pattern = /()(?(1)b|a)/;
733 actualmatch = string.match(pattern);
734 expectedmatch = null;
737 status = inSection(93);
738 pattern = /^(\()?blah(?(1)(\)))$/;
740 actualmatch = string.match(pattern);
741 expectedmatch = null;
744 status = inSection(94);
745 pattern = /^(\()?blah(?(1)(\)))$/;
747 actualmatch = string.match(pattern);
748 expectedmatch = null;
751 status = inSection(95);
752 pattern = /^(\(+)?blah(?(1)(\)))$/;
754 actualmatch = string.match(pattern);
755 expectedmatch = null;
758 status = inSection(96);
759 pattern = /^(\(+)?blah(?(1)(\)))$/;
761 actualmatch = string.match(pattern);
762 expectedmatch = null;
765 status = inSection(97);
766 pattern = /(?(?{0})a|b)/;
768 actualmatch = string.match(pattern);
769 expectedmatch = null;
772 status = inSection(98);
773 pattern = /(?(?{1})b|a)/;
775 actualmatch = string.match(pattern);
776 expectedmatch = null;
779 status = inSection(99);
780 pattern = /(?(?!a)a|b)/;
782 actualmatch = string.match(pattern);
783 expectedmatch = null;
786 status = inSection(100);
787 pattern = /(?(?=a)b|a)/;
789 actualmatch = string.match(pattern);
790 expectedmatch = null;
794 status = inSection(101);
795 pattern = /^(?=(a+?))\1ab/;
797 actualmatch = string.match(pattern);
798 expectedmatch = null;
801 status = inSection(102);
802 pattern = /^(?=(a+?))\1ab/;
804 actualmatch = string.match(pattern);
805 expectedmatch = null;
808 status = inSection(103);
809 pattern = /([\w:]+::)?(\w+)$/;
811 actualmatch = string.match(pattern);
812 expectedmatch = null;
815 status = inSection(104);
816 pattern = /([\w:]+::)?(\w+)$/;
818 actualmatch = string.match(pattern);
819 expectedmatch = null;
822 status = inSection(105);
825 actualmatch = string.match(pattern);
826 expectedmatch = null;
829 status = inSection(106);
832 actualmatch = string.match(pattern);
833 expectedmatch = null;
836 status = inSection(107);
839 actualmatch = string.match(pattern);
840 expectedmatch = null;
843 status = inSection(108);
846 actualmatch = string.match(pattern);
847 expectedmatch = null;
850 status = inSection(109);
853 actualmatch = string.match(pattern);
854 expectedmatch = null;
857 status = inSection(110);
860 actualmatch = string.match(pattern);
861 expectedmatch = null;
864 status = inSection(111);
867 actualmatch = string.match(pattern);
868 expectedmatch = null;
871 status = inSection(112);
874 actualmatch = string.match(pattern);
875 expectedmatch = null;
878 status = inSection(113);
881 actualmatch = string.match(pattern);
882 expectedmatch = null;
885 status = inSection(114);
888 actualmatch = string.match(pattern);
889 expectedmatch = null;
892 status = inSection(115);
895 actualmatch = string.match(pattern);
896 expectedmatch = null;
899 status = inSection(116);
902 actualmatch = string.match(pattern);
903 expectedmatch = null;
906 status = inSection(117);
909 actualmatch = string.match(pattern);
910 expectedmatch = null;
913 status = inSection(118);
916 actualmatch = string.match(pattern);
917 expectedmatch = null;
920 status = inSection(119);
923 actualmatch = string.match(pattern);
924 expectedmatch = null;
927 status = inSection(120);
930 actualmatch = string.match(pattern);
931 expectedmatch = null;
934 status = inSection(121);
937 actualmatch = string.match(pattern);
938 expectedmatch = null;
941 status = inSection(122);
944 actualmatch = string.match(pattern);
945 expectedmatch = null;
948 status = inSection(123);
951 actualmatch = string.match(pattern);
952 expectedmatch = null;
955 status = inSection(124);
958 actualmatch = string.match(pattern);
959 expectedmatch = null;
962 status = inSection(125);
965 actualmatch = string.match(pattern);
966 expectedmatch = null;
969 status = inSection(126);
972 actualmatch = string.match(pattern);
973 expectedmatch = null;
976 status = inSection(127);
979 actualmatch = string.match(pattern);
980 expectedmatch = null;
983 status = inSection(128);
986 actualmatch = string.match(pattern);
987 expectedmatch = null;
990 status = inSection(129);
993 actualmatch = string.match(pattern);
994 expectedmatch = null;
997 status = inSection(130);
1000 actualmatch = string.match(pattern);
1001 expectedmatch = null;
1004 status = inSection(131);
1007 actualmatch = string.match(pattern);
1008 expectedmatch = null;
1011 status = inSection(132);
1014 actualmatch = string.match(pattern);
1015 expectedmatch = null;
1018 status = inSection(133);
1021 actualmatch = string.match(pattern);
1022 expectedmatch = null;
1025 status = inSection(134);
1028 actualmatch = string.match(pattern);
1029 expectedmatch = null;
1032 status = inSection(135);
1035 actualmatch = string.match(pattern);
1036 expectedmatch = null;
1039 status = inSection(136);
1042 actualmatch = string.match(pattern);
1043 expectedmatch = null;
1046 status = inSection(137);
1049 actualmatch = string.match(pattern);
1050 expectedmatch = null;
1053 status = inSection(138);
1056 actualmatch = string.match(pattern);
1057 expectedmatch = null;
1060 status = inSection(139);
1063 actualmatch = string.match(pattern);
1064 expectedmatch = null;
1067 status = inSection(140);
1070 actualmatch = string.match(pattern);
1071 expectedmatch = null;
1074 status = inSection(141);
1077 actualmatch = string.match(pattern);
1078 expectedmatch = null;
1081 status = inSection(142);
1084 actualmatch = string.match(pattern);
1085 expectedmatch = null;
1088 status = inSection(143);
1091 actualmatch = string.match(pattern);
1092 expectedmatch = null;
1095 status = inSection(144);
1098 actualmatch = string.match(pattern);
1099 expectedmatch = null;
1102 status = inSection(145);
1105 actualmatch = string.match(pattern);
1106 expectedmatch = null;
1109 status = inSection(146);
1112 actualmatch = string.match(pattern);
1113 expectedmatch = null;
1116 status = inSection(147);
1119 actualmatch = string.match(pattern);
1120 expectedmatch = null;
1123 status = inSection(148);
1126 actualmatch = string.match(pattern);
1127 expectedmatch = null;
1130 status = inSection(149);
1133 actualmatch = string.match(pattern);
1134 expectedmatch = null;
1137 status = inSection(150);
1140 actualmatch = string.match(pattern);
1141 expectedmatch = null;
1144 status = inSection(151);
1147 actualmatch = string.match(pattern);
1148 expectedmatch = null;
1151 status = inSection(152);
1154 actualmatch = string.match(pattern);
1155 expectedmatch = null;
1158 status = inSection(153);
1161 actualmatch = string.match(pattern);
1162 expectedmatch = null;
1165 status = inSection(154);
1168 actualmatch = string.match(pattern);
1169 expectedmatch = null;
1172 status = inSection(155);
1175 actualmatch = string.match(pattern);
1176 expectedmatch = null;
1179 status = inSection(156);
1182 actualmatch = string.match(pattern);
1183 expectedmatch = null;
1186 status = inSection(157);
1189 actualmatch = string.match(pattern);
1190 expectedmatch = null;
1193 status = inSection(158);
1196 actualmatch = string.match(pattern);
1197 expectedmatch = null;
1200 status = inSection(159);
1203 actualmatch = string.match(pattern);
1204 expectedmatch = null;
1207 status = inSection(160);
1210 actualmatch = string.match(pattern);
1211 expectedmatch = null;
1214 status = inSection(161);
1217 actualmatch = string.match(pattern);
1218 expectedmatch = null;
1221 status = inSection(162);
1224 actualmatch = string.match(pattern);
1225 expectedmatch = null;
1228 status = inSection(163);
1231 actualmatch = string.match(pattern);
1232 expectedmatch = null;
1235 status = inSection(164);
1238 actualmatch = string.match(pattern);
1239 expectedmatch = null;
1242 status = inSection(165);
1245 actualmatch = string.match(pattern);
1246 expectedmatch = null;
1249 status = inSection(166);
1252 actualmatch = string.match(pattern);
1253 expectedmatch = null;
1256 status = inSection(167);
1259 actualmatch = string.match(pattern);
1260 expectedmatch = null;
1263 status = inSection(168);
1266 actualmatch = string.match(pattern);
1267 expectedmatch = null;
1270 status = inSection(169);
1273 actualmatch = string.match(pattern);
1274 expectedmatch = null;
1277 status = inSection(170);
1280 actualmatch = string.match(pattern);
1281 expectedmatch = null;
1284 status = inSection(171);
1287 actualmatch = string.match(pattern);
1288 expectedmatch = null;
1291 status = inSection(172);
1294 actualmatch = string.match(pattern);
1295 expectedmatch = null;
1298 status = inSection(173);
1301 actualmatch = string.match(pattern);
1302 expectedmatch = null;
1305 status = inSection(174);
1308 actualmatch = string.match(pattern);
1309 expectedmatch = null;
1312 status = inSection(175);
1315 actualmatch = string.match(pattern);
1316 expectedmatch = null;
1319 status = inSection(176);
1322 actualmatch = string.match(pattern);
1323 expectedmatch = null;
1326 status = inSection(177);
1329 actualmatch = string.match(pattern);
1330 expectedmatch = null;
1333 status = inSection(178);
1336 actualmatch = string.match(pattern);
1337 expectedmatch = null;
1340 status = inSection(179);
1343 actualmatch = string.match(pattern);
1344 expectedmatch = null;
1347 status = inSection(180);
1350 actualmatch = string.match(pattern);
1351 expectedmatch = null;
1354 status = inSection(181);
1357 actualmatch = string.match(pattern);
1358 expectedmatch = null;
1361 status = inSection(182);
1364 actualmatch = string.match(pattern);
1365 expectedmatch = null;
1368 status = inSection(183);
1371 actualmatch = string.match(pattern);
1372 expectedmatch = null;
1375 status = inSection(184);
1378 actualmatch = string.match(pattern);
1379 expectedmatch = null;
1382 status = inSection(185);
1385 actualmatch = string.match(pattern);
1386 expectedmatch = null;
1389 status = inSection(186);
1392 actualmatch = string.match(pattern);
1393 expectedmatch = null;
1396 status = inSection(187);
1399 actualmatch = string.match(pattern);
1400 expectedmatch = null;
1403 status = inSection(188);
1406 actualmatch = string.match(pattern);
1407 expectedmatch = null;
1410 status = inSection(189);
1413 actualmatch = string.match(pattern);
1414 expectedmatch = null;
1417 status = inSection(190);
1420 actualmatch = string.match(pattern);
1421 expectedmatch = null;
1424 status = inSection(191);
1427 actualmatch = string.match(pattern);
1428 expectedmatch = null;
1431 status = inSection(192);
1434 actualmatch = string.match(pattern);
1435 expectedmatch = null;
1438 status = inSection(193);
1441 actualmatch = string.match(pattern);
1442 expectedmatch = null;
1445 status = inSection(194);
1448 actualmatch = string.match(pattern);
1449 expectedmatch = null;
1452 status = inSection(195);
1455 actualmatch = string.match(pattern);
1456 expectedmatch = null;
1459 status = inSection(196);
1461 string = 'abb\nb\n';
1462 actualmatch = string.match(pattern);
1463 expectedmatch = null;
1466 status = inSection(197);
1468 string = 'abb\nb\n';
1469 actualmatch = string.match(pattern);
1470 expectedmatch = null;
1473 status = inSection(198);
1475 string = 'abb\nb\n';
1476 actualmatch = string.match(pattern);
1477 expectedmatch = null;
1480 status = inSection(199);
1482 string = 'b\nabb\n';
1483 actualmatch = string.match(pattern);
1484 expectedmatch = null;
1487 status = inSection(200);
1489 string = 'abb\nb\n';
1490 actualmatch = string.match(pattern);
1491 expectedmatch = null;
1494 status = inSection(201);
1496 string = 'b\nabb\n';
1497 actualmatch = string.match(pattern);
1498 expectedmatch = null;
1501 status = inSection(202);
1504 actualmatch = string.match(pattern);
1505 expectedmatch = null;
1508 status = inSection(203);
1511 actualmatch = string.match(pattern);
1512 expectedmatch = null;
1515 status = inSection(204);
1518 actualmatch = string.match(pattern);
1519 expectedmatch = null;
1522 status = inSection(205);
1525 actualmatch = string.match(pattern);
1526 expectedmatch = null;
1529 status = inSection(206);
1532 actualmatch = string.match(pattern);
1533 expectedmatch = null;
1536 status = inSection(207);
1539 actualmatch = string.match(pattern);
1540 expectedmatch = null;
1543 status = inSection(208);
1546 actualmatch = string.match(pattern);
1547 expectedmatch = null;
1550 status = inSection(209);
1553 actualmatch = string.match(pattern);
1554 expectedmatch = null;
1557 status = inSection(210);
1560 actualmatch = string.match(pattern);
1561 expectedmatch = null;
1564 status = inSection(211);
1567 actualmatch = string.match(pattern);
1568 expectedmatch = null;
1571 status = inSection(212);
1574 actualmatch = string.match(pattern);
1575 expectedmatch = null;
1578 status = inSection(213);
1581 actualmatch = string.match(pattern);
1582 expectedmatch = null;
1585 status = inSection(214);
1588 actualmatch = string.match(pattern);
1589 expectedmatch = null;
1592 status = inSection(215);
1595 actualmatch = string.match(pattern);
1596 expectedmatch = null;
1599 status = inSection(216);
1602 actualmatch = string.match(pattern);
1603 expectedmatch = null;
1606 status = inSection(217);
1609 actualmatch = string.match(pattern);
1610 expectedmatch = null;
1613 status = inSection(218);
1616 actualmatch = string.match(pattern);
1617 expectedmatch = null;
1620 status = inSection(219);
1623 actualmatch = string.match(pattern);
1624 expectedmatch = null;
1627 status = inSection(220);
1630 actualmatch = string.match(pattern);
1631 expectedmatch = null;
1634 status = inSection(221);
1637 actualmatch = string.match(pattern);
1638 expectedmatch = null;
1641 status = inSection(222);
1644 actualmatch = string.match(pattern);
1645 expectedmatch = null;
1648 status = inSection(223);
1651 actualmatch = string.match(pattern);
1652 expectedmatch = null;
1655 status = inSection(224);
1658 actualmatch = string.match(pattern);
1659 expectedmatch = null;
1662 status = inSection(225);
1665 actualmatch = string.match(pattern);
1666 expectedmatch = null;
1669 status = inSection(226);
1672 actualmatch = string.match(pattern);
1673 expectedmatch = null;
1676 status = inSection(227);
1679 actualmatch = string.match(pattern);
1680 expectedmatch = null;
1683 status = inSection(228);
1686 actualmatch = string.match(pattern);
1687 expectedmatch = null;
1690 status = inSection(229);
1693 actualmatch = string.match(pattern);
1694 expectedmatch = null;
1697 status = inSection(230);
1700 actualmatch = string.match(pattern);
1701 expectedmatch = null;
1704 status = inSection(231);
1707 actualmatch = string.match(pattern);
1708 expectedmatch = null;
1711 status = inSection(232);
1714 actualmatch = string.match(pattern);
1715 expectedmatch = null;
1718 status = inSection(233);
1721 actualmatch = string.match(pattern);
1722 expectedmatch = null;
1725 status = inSection(234);
1728 actualmatch = string.match(pattern);
1729 expectedmatch = null;
1732 status = inSection(235);
1735 actualmatch = string.match(pattern);
1736 expectedmatch = null;
1739 status = inSection(236);
1742 actualmatch = string.match(pattern);
1743 expectedmatch = null;
1746 status = inSection(237);
1749 actualmatch = string.match(pattern);
1750 expectedmatch = null;
1753 status = inSection(238);
1754 pattern = /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/;
1756 actualmatch = string.match(pattern);
1757 expectedmatch = null;
1760 status = inSection(239);
1763 actualmatch = string.match(pattern);
1764 expectedmatch = null;
1767 status = inSection(240);
1768 pattern = /\.c(pp|xx|c)?$/i;
1770 actualmatch = string.match(pattern);
1771 expectedmatch = null;
1774 status = inSection(241);
1775 pattern = /^([a-z]:)/;
1777 actualmatch = string.match(pattern);
1778 expectedmatch = null;
1781 status = inSection(242);
1782 pattern = /(\w)?(abc)\1b/;
1784 actualmatch = string.match(pattern);
1785 expectedmatch = null;
1788 /* ECMA doesn't support (?(
1789 status = inSection(243);
1790 pattern = /^(a)?(?(1)a|b)+$/;
1792 actualmatch = string.match(pattern);
1793 expectedmatch = null;
1799 //-----------------------------------------------------------------------------
1801 //-----------------------------------------------------------------------------
1807 if(omitCurrentSection())
1810 statusmessages[i] = status;
1811 patterns[i] = pattern;
1812 strings[i] = string;
1813 actualmatches[i] = actualmatch;
1814 expectedmatches[i] = expectedmatch;
1819 function omitCurrentSection()
1823 // current section number is in global status variable
1824 var n = status.match(/(\d+)/)[1];
1825 return ((n < cnLBOUND) || (n > cnUBOUND));
1837 printBugNumber(BUGNUMBER);
1838 printStatus (summary);
1839 testRegExp(statusmessages, patterns, strings, actualmatches, expectedmatches);