1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
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
17 * Netscape Communications Corp.
18 * Portions created by the Initial Developer are Copyright (C) 2002
19 * the Initial Developer. All Rights Reserved.
22 * pschwartau@netscape.com, rogerl@netscape.com
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK *****
40 * SUMMARY: Testing JS RegExp engine against Perl 5 RegExp engine.
41 * Adjust cnLBOUND, cnUBOUND below to restrict which sections are tested.
43 * This test was created by running various patterns and strings through the
44 * Perl 5 RegExp engine. We saved the results below to test the JS engine.
46 * Each of the examples below is a negative test; that is, each produces a
47 * null match in Perl. Thus we set |expectedmatch| = |null| in each section.
49 * NOTE: ECMA/JS and Perl do differ on certain points. We have either commented
50 * out such sections altogether, or modified them to fit what we expect from JS.
54 * - ECMA does support (?: (?= and (?! operators, but doesn't support (?< etc.
56 * - ECMA doesn't support (?(condition)
59 //-----------------------------------------------------------------------------
62 var summary = 'Testing regular expression edge cases';
63 var cnSingleSpace = ' ';
65 var statusmessages = new Array();
67 var patterns = new Array();
69 var strings = new Array();
71 var actualmatches = new Array();
72 var expectedmatch = '';
73 var expectedmatches = new Array();
78 status = inSection(1);
81 actualmatch = string.match(pattern);
85 status = inSection(2);
88 actualmatch = string.match(pattern);
92 status = inSection(3);
95 actualmatch = string.match(pattern);
99 status = inSection(4);
102 actualmatch = string.match(pattern);
103 expectedmatch = null;
106 status = inSection(5);
109 actualmatch = string.match(pattern);
110 expectedmatch = null;
113 status = inSection(6);
114 pattern = /ab{1,}bc/;
116 actualmatch = string.match(pattern);
117 expectedmatch = null;
120 status = inSection(7);
121 pattern = /ab{4,5}bc/;
123 actualmatch = string.match(pattern);
124 expectedmatch = null;
127 status = inSection(8);
130 actualmatch = string.match(pattern);
131 expectedmatch = null;
134 status = inSection(9);
137 actualmatch = string.match(pattern);
138 expectedmatch = null;
141 status = inSection(10);
144 actualmatch = string.match(pattern);
145 expectedmatch = null;
148 status = inSection(11);
151 actualmatch = string.match(pattern);
152 expectedmatch = null;
155 status = inSection(12);
158 actualmatch = string.match(pattern);
159 expectedmatch = null;
162 status = inSection(13);
165 actualmatch = string.match(pattern);
166 expectedmatch = null;
169 status = inSection(14);
172 actualmatch = string.match(pattern);
173 expectedmatch = null;
176 status = inSection(15);
179 actualmatch = string.match(pattern);
180 expectedmatch = null;
183 status = inSection(16);
186 actualmatch = string.match(pattern);
187 expectedmatch = null;
190 status = inSection(17);
193 actualmatch = string.match(pattern);
194 expectedmatch = null;
197 status = inSection(18);
200 actualmatch = string.match(pattern);
201 expectedmatch = null;
204 status = inSection(19);
207 actualmatch = string.match(pattern);
208 expectedmatch = null;
211 status = inSection(20);
214 actualmatch = string.match(pattern);
215 expectedmatch = null;
218 status = inSection(21);
221 actualmatch = string.match(pattern);
222 expectedmatch = null;
225 status = inSection(22);
228 actualmatch = string.match(pattern);
229 expectedmatch = null;
232 status = inSection(23);
235 actualmatch = string.match(pattern);
236 expectedmatch = null;
239 status = inSection(24);
242 actualmatch = string.match(pattern);
243 expectedmatch = null;
246 status = inSection(25);
249 actualmatch = string.match(pattern);
250 expectedmatch = null;
253 status = inSection(26);
256 actualmatch = string.match(pattern);
257 expectedmatch = null;
260 status = inSection(27);
263 actualmatch = string.match(pattern);
264 expectedmatch = null;
267 status = inSection(28);
270 actualmatch = string.match(pattern);
271 expectedmatch = null;
274 status = inSection(29);
277 actualmatch = string.match(pattern);
278 expectedmatch = null;
281 status = inSection(30);
284 actualmatch = string.match(pattern);
285 expectedmatch = null;
288 status = inSection(31);
291 actualmatch = string.match(pattern);
292 expectedmatch = null;
295 status = inSection(32);
298 actualmatch = string.match(pattern);
299 expectedmatch = null;
302 status = inSection(33);
305 actualmatch = string.match(pattern);
306 expectedmatch = null;
309 status = inSection(34);
312 actualmatch = string.match(pattern);
313 expectedmatch = null;
316 status = inSection(35);
317 pattern = /^(ab|cd)e/;
319 actualmatch = string.match(pattern);
320 expectedmatch = null;
323 status = inSection(36);
324 pattern = /a[bcd]+dcdcde/;
326 actualmatch = string.match(pattern);
327 expectedmatch = null;
330 status = inSection(37);
331 pattern = /(bc+d$|ef*g.|h?i(j|k))/;
333 actualmatch = string.match(pattern);
334 expectedmatch = null;
337 status = inSection(38);
338 pattern = /(bc+d$|ef*g.|h?i(j|k))/;
340 actualmatch = string.match(pattern);
341 expectedmatch = null;
344 status = inSection(39);
347 actualmatch = string.match(pattern);
348 expectedmatch = null;
351 // MODIFIED - ECMA has different rules for paren contents.
352 status = inSection(40);
355 actualmatch = string.match(pattern);
356 //expectedmatch = null;
357 expectedmatch = Array("", undefined);
360 // MODIFIED - ECMA has different rules for paren contents.
361 status = inSection(41);
362 pattern = /((\3|b)\2(a)x)+/;
363 string = 'aaxabxbaxbbx';
364 actualmatch = string.match(pattern);
365 //expectedmatch = null;
366 expectedmatch = Array("ax", "ax", "", "a");
369 status = inSection(42);
372 actualmatch = string.match(pattern);
373 expectedmatch = null;
376 status = inSection(43);
379 actualmatch = string.match(pattern);
380 expectedmatch = null;
383 status = inSection(44);
386 actualmatch = string.match(pattern);
387 expectedmatch = null;
390 status = inSection(45);
393 actualmatch = string.match(pattern);
394 expectedmatch = null;
397 status = inSection(46);
400 actualmatch = string.match(pattern);
401 expectedmatch = null;
404 status = inSection(47);
405 pattern = /ab{1,}bc/i;
407 actualmatch = string.match(pattern);
408 expectedmatch = null;
411 status = inSection(48);
412 pattern = /ab{4,5}?bc/i;
414 actualmatch = string.match(pattern);
415 expectedmatch = null;
418 status = inSection(49);
421 actualmatch = string.match(pattern);
422 expectedmatch = null;
425 status = inSection(50);
428 actualmatch = string.match(pattern);
429 expectedmatch = null;
432 status = inSection(51);
435 actualmatch = string.match(pattern);
436 expectedmatch = null;
439 status = inSection(52);
442 actualmatch = string.match(pattern);
443 expectedmatch = null;
446 status = inSection(53);
449 actualmatch = string.match(pattern);
450 expectedmatch = null;
453 status = inSection(54);
454 pattern = /a[b-d]e/i;
456 actualmatch = string.match(pattern);
457 expectedmatch = null;
460 status = inSection(55);
461 pattern = /a[^bc]d/i;
463 actualmatch = string.match(pattern);
464 expectedmatch = null;
467 status = inSection(56);
468 pattern = /a[^-b]c/i;
470 actualmatch = string.match(pattern);
471 expectedmatch = null;
474 status = inSection(57);
475 pattern = /a[^]b]c/i;
477 actualmatch = string.match(pattern);
478 expectedmatch = null;
481 status = inSection(58);
484 actualmatch = string.match(pattern);
485 expectedmatch = null;
488 status = inSection(59);
489 pattern = /^(ab|cd)e/i;
491 actualmatch = string.match(pattern);
492 expectedmatch = null;
495 status = inSection(60);
496 pattern = /a[bcd]+dcdcde/i;
498 actualmatch = string.match(pattern);
499 expectedmatch = null;
502 status = inSection(61);
503 pattern = /(bc+d$|ef*g.|h?i(j|k))/i;
505 actualmatch = string.match(pattern);
506 expectedmatch = null;
509 status = inSection(62);
510 pattern = /(bc+d$|ef*g.|h?i(j|k))/i;
512 actualmatch = string.match(pattern);
513 expectedmatch = null;
516 status = inSection(63);
519 actualmatch = string.match(pattern);
520 expectedmatch = null;
523 status = inSection(64);
524 pattern = /^(a\1?){4}$/;
525 string = 'aaaaaaaaa';
526 actualmatch = string.match(pattern);
527 expectedmatch = null;
530 status = inSection(65);
531 pattern = /^(a\1?){4}$/;
532 string = 'aaaaaaaaaaa';
533 actualmatch = string.match(pattern);
534 expectedmatch = null;
537 /* ECMA doesn't support (?(
538 status = inSection(66);
539 pattern = /^(a(?(1)\1)){4}$/;
540 string = 'aaaaaaaaa';
541 actualmatch = string.match(pattern);
542 expectedmatch = null;
545 status = inSection(67);
546 pattern = /^(a(?(1)\1)){4}$/;
547 string = 'aaaaaaaaaaa';
548 actualmatch = string.match(pattern);
549 expectedmatch = null;
553 /* ECMA doesn't support (?<
554 status = inSection(68);
557 actualmatch = string.match(pattern);
558 expectedmatch = null;
561 status = inSection(69);
564 actualmatch = string.match(pattern);
565 expectedmatch = null;
568 status = inSection(70);
571 actualmatch = string.match(pattern);
572 expectedmatch = null;
576 /* ECMA doesn't support (?(condition)
577 status = inSection(71);
578 pattern = /(?:(?i)a)b/;
580 actualmatch = string.match(pattern);
581 expectedmatch = null;
584 status = inSection(72);
585 pattern = /((?i)a)b/;
587 actualmatch = string.match(pattern);
588 expectedmatch = null;
591 status = inSection(73);
594 actualmatch = string.match(pattern);
595 expectedmatch = null;
598 status = inSection(74);
599 pattern = /((?i:a))b/;
601 actualmatch = string.match(pattern);
602 expectedmatch = null;
605 status = inSection(75);
606 pattern = /(?:(?-i)a)b/i;
608 actualmatch = string.match(pattern);
609 expectedmatch = null;
612 status = inSection(76);
613 pattern = /((?-i)a)b/i;
615 actualmatch = string.match(pattern);
616 expectedmatch = null;
619 status = inSection(77);
620 pattern = /(?:(?-i)a)b/i;
622 actualmatch = string.match(pattern);
623 expectedmatch = null;
626 status = inSection(78);
627 pattern = /((?-i)a)b/i;
629 actualmatch = string.match(pattern);
630 expectedmatch = null;
633 status = inSection(79);
634 pattern = /(?-i:a)b/i;
636 actualmatch = string.match(pattern);
637 expectedmatch = null;
640 status = inSection(80);
641 pattern = /((?-i:a))b/i;
643 actualmatch = string.match(pattern);
644 expectedmatch = null;
647 status = inSection(81);
648 pattern = /(?-i:a)b/i;
650 actualmatch = string.match(pattern);
651 expectedmatch = null;
654 status = inSection(82);
655 pattern = /((?-i:a))b/i;
657 actualmatch = string.match(pattern);
658 expectedmatch = null;
661 status = inSection(83);
662 pattern = /((?-i:a.))b/i;
664 actualmatch = string.match(pattern);
665 expectedmatch = null;
668 status = inSection(84);
669 pattern = /((?s-i:a.))b/i;
671 actualmatch = string.match(pattern);
672 expectedmatch = null;
676 /* ECMA doesn't support (?<
677 status = inSection(85);
678 pattern = /(?<![cd])b/;
680 actualmatch = string.match(pattern);
681 expectedmatch = null;
684 status = inSection(86);
685 pattern = /(?<!(c|d))b/;
687 actualmatch = string.match(pattern);
688 expectedmatch = null;
692 status = inSection(87);
693 pattern = /^(?:a?b?)*$/;
695 actualmatch = string.match(pattern);
696 expectedmatch = null;
699 status = inSection(88);
701 string = 'a\nb\nc\n';
702 actualmatch = string.match(pattern);
703 expectedmatch = null;
706 status = inSection(89);
708 string = 'a\nb\nc\n';
709 actualmatch = string.match(pattern);
710 expectedmatch = null;
713 /* ECMA doesn't support (?(
714 status = inSection(90);
715 pattern = /(?(1)a|b)/;
717 actualmatch = string.match(pattern);
718 expectedmatch = null;
721 status = inSection(91);
722 pattern = /(x)?(?(1)a|b)/;
724 actualmatch = string.match(pattern);
725 expectedmatch = null;
728 status = inSection(92);
729 pattern = /()(?(1)b|a)/;
731 actualmatch = string.match(pattern);
732 expectedmatch = null;
735 status = inSection(93);
736 pattern = /^(\()?blah(?(1)(\)))$/;
738 actualmatch = string.match(pattern);
739 expectedmatch = null;
742 status = inSection(94);
743 pattern = /^(\()?blah(?(1)(\)))$/;
745 actualmatch = string.match(pattern);
746 expectedmatch = null;
749 status = inSection(95);
750 pattern = /^(\(+)?blah(?(1)(\)))$/;
752 actualmatch = string.match(pattern);
753 expectedmatch = null;
756 status = inSection(96);
757 pattern = /^(\(+)?blah(?(1)(\)))$/;
759 actualmatch = string.match(pattern);
760 expectedmatch = null;
763 status = inSection(97);
764 pattern = /(?(?{0})a|b)/;
766 actualmatch = string.match(pattern);
767 expectedmatch = null;
770 status = inSection(98);
771 pattern = /(?(?{1})b|a)/;
773 actualmatch = string.match(pattern);
774 expectedmatch = null;
777 status = inSection(99);
778 pattern = /(?(?!a)a|b)/;
780 actualmatch = string.match(pattern);
781 expectedmatch = null;
784 status = inSection(100);
785 pattern = /(?(?=a)b|a)/;
787 actualmatch = string.match(pattern);
788 expectedmatch = null;
792 status = inSection(101);
793 pattern = /^(?=(a+?))\1ab/;
795 actualmatch = string.match(pattern);
796 expectedmatch = null;
799 status = inSection(102);
800 pattern = /^(?=(a+?))\1ab/;
802 actualmatch = string.match(pattern);
803 expectedmatch = null;
806 status = inSection(103);
807 pattern = /([\w:]+::)?(\w+)$/;
809 actualmatch = string.match(pattern);
810 expectedmatch = null;
813 status = inSection(104);
814 pattern = /([\w:]+::)?(\w+)$/;
816 actualmatch = string.match(pattern);
817 expectedmatch = null;
820 status = inSection(105);
823 actualmatch = string.match(pattern);
824 expectedmatch = null;
827 status = inSection(106);
830 actualmatch = string.match(pattern);
831 expectedmatch = null;
834 status = inSection(107);
837 actualmatch = string.match(pattern);
838 expectedmatch = null;
841 status = inSection(108);
844 actualmatch = string.match(pattern);
845 expectedmatch = null;
848 status = inSection(109);
851 actualmatch = string.match(pattern);
852 expectedmatch = null;
855 status = inSection(110);
858 actualmatch = string.match(pattern);
859 expectedmatch = null;
862 status = inSection(111);
865 actualmatch = string.match(pattern);
866 expectedmatch = null;
869 status = inSection(112);
872 actualmatch = string.match(pattern);
873 expectedmatch = null;
876 status = inSection(113);
879 actualmatch = string.match(pattern);
880 expectedmatch = null;
883 status = inSection(114);
886 actualmatch = string.match(pattern);
887 expectedmatch = null;
890 status = inSection(115);
893 actualmatch = string.match(pattern);
894 expectedmatch = null;
897 status = inSection(116);
900 actualmatch = string.match(pattern);
901 expectedmatch = null;
904 status = inSection(117);
907 actualmatch = string.match(pattern);
908 expectedmatch = null;
911 status = inSection(118);
914 actualmatch = string.match(pattern);
915 expectedmatch = null;
918 status = inSection(119);
921 actualmatch = string.match(pattern);
922 expectedmatch = null;
925 status = inSection(120);
928 actualmatch = string.match(pattern);
929 expectedmatch = null;
932 status = inSection(121);
935 actualmatch = string.match(pattern);
936 expectedmatch = null;
939 status = inSection(122);
942 actualmatch = string.match(pattern);
943 expectedmatch = null;
946 status = inSection(123);
949 actualmatch = string.match(pattern);
950 expectedmatch = null;
953 status = inSection(124);
956 actualmatch = string.match(pattern);
957 expectedmatch = null;
960 status = inSection(125);
963 actualmatch = string.match(pattern);
964 expectedmatch = null;
967 status = inSection(126);
970 actualmatch = string.match(pattern);
971 expectedmatch = null;
974 status = inSection(127);
977 actualmatch = string.match(pattern);
978 expectedmatch = null;
981 status = inSection(128);
984 actualmatch = string.match(pattern);
985 expectedmatch = null;
988 status = inSection(129);
991 actualmatch = string.match(pattern);
992 expectedmatch = null;
995 status = inSection(130);
998 actualmatch = string.match(pattern);
999 expectedmatch = null;
1002 status = inSection(131);
1005 actualmatch = string.match(pattern);
1006 expectedmatch = null;
1009 status = inSection(132);
1012 actualmatch = string.match(pattern);
1013 expectedmatch = null;
1016 status = inSection(133);
1019 actualmatch = string.match(pattern);
1020 expectedmatch = null;
1023 status = inSection(134);
1026 actualmatch = string.match(pattern);
1027 expectedmatch = null;
1030 status = inSection(135);
1033 actualmatch = string.match(pattern);
1034 expectedmatch = null;
1037 status = inSection(136);
1040 actualmatch = string.match(pattern);
1041 expectedmatch = null;
1044 status = inSection(137);
1047 actualmatch = string.match(pattern);
1048 expectedmatch = null;
1051 status = inSection(138);
1054 actualmatch = string.match(pattern);
1055 expectedmatch = null;
1058 status = inSection(139);
1061 actualmatch = string.match(pattern);
1062 expectedmatch = null;
1065 status = inSection(140);
1068 actualmatch = string.match(pattern);
1069 expectedmatch = null;
1072 status = inSection(141);
1075 actualmatch = string.match(pattern);
1076 expectedmatch = null;
1079 status = inSection(142);
1082 actualmatch = string.match(pattern);
1083 expectedmatch = null;
1086 status = inSection(143);
1089 actualmatch = string.match(pattern);
1090 expectedmatch = null;
1093 status = inSection(144);
1096 actualmatch = string.match(pattern);
1097 expectedmatch = null;
1100 status = inSection(145);
1103 actualmatch = string.match(pattern);
1104 expectedmatch = null;
1107 status = inSection(146);
1110 actualmatch = string.match(pattern);
1111 expectedmatch = null;
1114 status = inSection(147);
1117 actualmatch = string.match(pattern);
1118 expectedmatch = null;
1121 status = inSection(148);
1124 actualmatch = string.match(pattern);
1125 expectedmatch = null;
1128 status = inSection(149);
1131 actualmatch = string.match(pattern);
1132 expectedmatch = null;
1135 status = inSection(150);
1138 actualmatch = string.match(pattern);
1139 expectedmatch = null;
1142 status = inSection(151);
1145 actualmatch = string.match(pattern);
1146 expectedmatch = null;
1149 status = inSection(152);
1152 actualmatch = string.match(pattern);
1153 expectedmatch = null;
1156 status = inSection(153);
1159 actualmatch = string.match(pattern);
1160 expectedmatch = null;
1163 status = inSection(154);
1166 actualmatch = string.match(pattern);
1167 expectedmatch = null;
1170 status = inSection(155);
1173 actualmatch = string.match(pattern);
1174 expectedmatch = null;
1177 status = inSection(156);
1180 actualmatch = string.match(pattern);
1181 expectedmatch = null;
1184 status = inSection(157);
1187 actualmatch = string.match(pattern);
1188 expectedmatch = null;
1191 status = inSection(158);
1194 actualmatch = string.match(pattern);
1195 expectedmatch = null;
1198 status = inSection(159);
1201 actualmatch = string.match(pattern);
1202 expectedmatch = null;
1205 status = inSection(160);
1208 actualmatch = string.match(pattern);
1209 expectedmatch = null;
1212 status = inSection(161);
1215 actualmatch = string.match(pattern);
1216 expectedmatch = null;
1219 status = inSection(162);
1222 actualmatch = string.match(pattern);
1223 expectedmatch = null;
1226 status = inSection(163);
1229 actualmatch = string.match(pattern);
1230 expectedmatch = null;
1233 status = inSection(164);
1236 actualmatch = string.match(pattern);
1237 expectedmatch = null;
1240 status = inSection(165);
1243 actualmatch = string.match(pattern);
1244 expectedmatch = null;
1247 status = inSection(166);
1250 actualmatch = string.match(pattern);
1251 expectedmatch = null;
1254 status = inSection(167);
1257 actualmatch = string.match(pattern);
1258 expectedmatch = null;
1261 status = inSection(168);
1264 actualmatch = string.match(pattern);
1265 expectedmatch = null;
1268 status = inSection(169);
1271 actualmatch = string.match(pattern);
1272 expectedmatch = null;
1275 status = inSection(170);
1278 actualmatch = string.match(pattern);
1279 expectedmatch = null;
1282 status = inSection(171);
1285 actualmatch = string.match(pattern);
1286 expectedmatch = null;
1289 status = inSection(172);
1292 actualmatch = string.match(pattern);
1293 expectedmatch = null;
1296 status = inSection(173);
1299 actualmatch = string.match(pattern);
1300 expectedmatch = null;
1303 status = inSection(174);
1306 actualmatch = string.match(pattern);
1307 expectedmatch = null;
1310 status = inSection(175);
1313 actualmatch = string.match(pattern);
1314 expectedmatch = null;
1317 status = inSection(176);
1320 actualmatch = string.match(pattern);
1321 expectedmatch = null;
1324 status = inSection(177);
1327 actualmatch = string.match(pattern);
1328 expectedmatch = null;
1331 status = inSection(178);
1334 actualmatch = string.match(pattern);
1335 expectedmatch = null;
1338 status = inSection(179);
1341 actualmatch = string.match(pattern);
1342 expectedmatch = null;
1345 status = inSection(180);
1348 actualmatch = string.match(pattern);
1349 expectedmatch = null;
1352 status = inSection(181);
1355 actualmatch = string.match(pattern);
1356 expectedmatch = null;
1359 status = inSection(182);
1362 actualmatch = string.match(pattern);
1363 expectedmatch = null;
1366 status = inSection(183);
1369 actualmatch = string.match(pattern);
1370 expectedmatch = null;
1373 status = inSection(184);
1376 actualmatch = string.match(pattern);
1377 expectedmatch = null;
1380 status = inSection(185);
1383 actualmatch = string.match(pattern);
1384 expectedmatch = null;
1387 status = inSection(186);
1390 actualmatch = string.match(pattern);
1391 expectedmatch = null;
1394 status = inSection(187);
1397 actualmatch = string.match(pattern);
1398 expectedmatch = null;
1401 status = inSection(188);
1404 actualmatch = string.match(pattern);
1405 expectedmatch = null;
1408 status = inSection(189);
1411 actualmatch = string.match(pattern);
1412 expectedmatch = null;
1415 status = inSection(190);
1418 actualmatch = string.match(pattern);
1419 expectedmatch = null;
1422 status = inSection(191);
1425 actualmatch = string.match(pattern);
1426 expectedmatch = null;
1429 status = inSection(192);
1432 actualmatch = string.match(pattern);
1433 expectedmatch = null;
1436 status = inSection(193);
1439 actualmatch = string.match(pattern);
1440 expectedmatch = null;
1443 status = inSection(194);
1446 actualmatch = string.match(pattern);
1447 expectedmatch = null;
1450 status = inSection(195);
1453 actualmatch = string.match(pattern);
1454 expectedmatch = null;
1457 status = inSection(196);
1459 string = 'abb\nb\n';
1460 actualmatch = string.match(pattern);
1461 expectedmatch = null;
1464 status = inSection(197);
1466 string = 'abb\nb\n';
1467 actualmatch = string.match(pattern);
1468 expectedmatch = null;
1471 status = inSection(198);
1473 string = 'abb\nb\n';
1474 actualmatch = string.match(pattern);
1475 expectedmatch = null;
1478 status = inSection(199);
1480 string = 'b\nabb\n';
1481 actualmatch = string.match(pattern);
1482 expectedmatch = null;
1485 status = inSection(200);
1487 string = 'abb\nb\n';
1488 actualmatch = string.match(pattern);
1489 expectedmatch = null;
1492 status = inSection(201);
1494 string = 'b\nabb\n';
1495 actualmatch = string.match(pattern);
1496 expectedmatch = null;
1499 status = inSection(202);
1502 actualmatch = string.match(pattern);
1503 expectedmatch = null;
1506 status = inSection(203);
1509 actualmatch = string.match(pattern);
1510 expectedmatch = null;
1513 status = inSection(204);
1516 actualmatch = string.match(pattern);
1517 expectedmatch = null;
1520 status = inSection(205);
1523 actualmatch = string.match(pattern);
1524 expectedmatch = null;
1527 status = inSection(206);
1530 actualmatch = string.match(pattern);
1531 expectedmatch = null;
1534 status = inSection(207);
1537 actualmatch = string.match(pattern);
1538 expectedmatch = null;
1541 status = inSection(208);
1544 actualmatch = string.match(pattern);
1545 expectedmatch = null;
1548 status = inSection(209);
1551 actualmatch = string.match(pattern);
1552 expectedmatch = null;
1555 status = inSection(210);
1558 actualmatch = string.match(pattern);
1559 expectedmatch = null;
1562 status = inSection(211);
1565 actualmatch = string.match(pattern);
1566 expectedmatch = null;
1569 status = inSection(212);
1572 actualmatch = string.match(pattern);
1573 expectedmatch = null;
1576 status = inSection(213);
1579 actualmatch = string.match(pattern);
1580 expectedmatch = null;
1583 status = inSection(214);
1586 actualmatch = string.match(pattern);
1587 expectedmatch = null;
1590 status = inSection(215);
1593 actualmatch = string.match(pattern);
1594 expectedmatch = null;
1597 status = inSection(216);
1600 actualmatch = string.match(pattern);
1601 expectedmatch = null;
1604 status = inSection(217);
1607 actualmatch = string.match(pattern);
1608 expectedmatch = null;
1611 status = inSection(218);
1614 actualmatch = string.match(pattern);
1615 expectedmatch = null;
1618 status = inSection(219);
1621 actualmatch = string.match(pattern);
1622 expectedmatch = null;
1625 status = inSection(220);
1628 actualmatch = string.match(pattern);
1629 expectedmatch = null;
1632 status = inSection(221);
1635 actualmatch = string.match(pattern);
1636 expectedmatch = null;
1639 status = inSection(222);
1642 actualmatch = string.match(pattern);
1643 expectedmatch = null;
1646 status = inSection(223);
1649 actualmatch = string.match(pattern);
1650 expectedmatch = null;
1653 status = inSection(224);
1656 actualmatch = string.match(pattern);
1657 expectedmatch = null;
1660 status = inSection(225);
1663 actualmatch = string.match(pattern);
1664 expectedmatch = null;
1667 status = inSection(226);
1670 actualmatch = string.match(pattern);
1671 expectedmatch = null;
1674 status = inSection(227);
1677 actualmatch = string.match(pattern);
1678 expectedmatch = null;
1681 status = inSection(228);
1684 actualmatch = string.match(pattern);
1685 expectedmatch = null;
1688 status = inSection(229);
1691 actualmatch = string.match(pattern);
1692 expectedmatch = null;
1695 status = inSection(230);
1698 actualmatch = string.match(pattern);
1699 expectedmatch = null;
1702 status = inSection(231);
1705 actualmatch = string.match(pattern);
1706 expectedmatch = null;
1709 status = inSection(232);
1712 actualmatch = string.match(pattern);
1713 expectedmatch = null;
1716 status = inSection(233);
1719 actualmatch = string.match(pattern);
1720 expectedmatch = null;
1723 status = inSection(234);
1726 actualmatch = string.match(pattern);
1727 expectedmatch = null;
1730 status = inSection(235);
1733 actualmatch = string.match(pattern);
1734 expectedmatch = null;
1737 status = inSection(236);
1740 actualmatch = string.match(pattern);
1741 expectedmatch = null;
1744 status = inSection(237);
1747 actualmatch = string.match(pattern);
1748 expectedmatch = null;
1751 status = inSection(238);
1752 pattern = /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/;
1754 actualmatch = string.match(pattern);
1755 expectedmatch = null;
1758 status = inSection(239);
1761 actualmatch = string.match(pattern);
1762 expectedmatch = null;
1765 status = inSection(240);
1766 pattern = /\.c(pp|xx|c)?$/i;
1768 actualmatch = string.match(pattern);
1769 expectedmatch = null;
1772 status = inSection(241);
1773 pattern = /^([a-z]:)/;
1775 actualmatch = string.match(pattern);
1776 expectedmatch = null;
1779 status = inSection(242);
1780 pattern = /(\w)?(abc)\1b/;
1782 actualmatch = string.match(pattern);
1783 expectedmatch = null;
1786 /* ECMA doesn't support (?(
1787 status = inSection(243);
1788 pattern = /^(a)?(?(1)a|b)+$/;
1790 actualmatch = string.match(pattern);
1791 expectedmatch = null;
1797 //-----------------------------------------------------------------------------
1799 //-----------------------------------------------------------------------------
1805 if(omitCurrentSection())
1808 statusmessages[i] = status;
1809 patterns[i] = pattern;
1810 strings[i] = string;
1811 actualmatches[i] = actualmatch;
1812 expectedmatches[i] = expectedmatch;
1817 function omitCurrentSection()
1821 // current section number is in global status variable
1822 var n = status.match(/(\d+)/)[1];
1823 return ((n < cnLBOUND) || (n > cnUBOUND));
1835 printBugNumber (bug);
1836 printStatus (summary);
1837 testRegExp(statusmessages, patterns, strings, actualmatches, expectedmatches);