Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / tests / ecma_3 / RegExp / perlstress-002.js
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
4  *
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/
9  *
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
13  * License.
14  *
15  * The Original Code is JavaScript Engine testing utilities.
16  *
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.
21  *
22  * Contributor(s):
23  *   pschwartau@netscape.com, rogerl@netscape.com
24  *
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.
36  *
37  * ***** END LICENSE BLOCK ***** */
38
39 /*
40  *
41  * Date:    2002-07-07
42  * SUMMARY: Testing JS RegExp engine against Perl 5 RegExp engine.
43  * Adjust cnLBOUND, cnUBOUND below to restrict which sections are tested.
44  *
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.
47  *
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.
50  *
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.
53  *
54  * EXAMPLES:
55  *
56  * - ECMA does support (?: (?= and (?! operators, but doesn't support (?<  etc.
57  *
58  * - ECMA doesn't support (?(condition)
59  *
60  */
61 //-----------------------------------------------------------------------------
62 var i = 0;
63 var BUGNUMBER = 85721;
64 var summary = 'Testing regular expression edge cases';
65 var cnSingleSpace = ' ';
66 var status = '';
67 var statusmessages = new Array();
68 var pattern = '';
69 var patterns = new Array();
70 var string = '';
71 var strings = new Array();
72 var actualmatch = '';
73 var actualmatches = new Array();
74 var expectedmatch = '';
75 var expectedmatches = new Array();
76 var cnLBOUND = 0;
77 var cnUBOUND = 1000;
78
79
80 status = inSection(1);
81 pattern = /abc/;
82 string = 'xbc';
83 actualmatch = string.match(pattern);
84 expectedmatch = null;
85 addThis();
86
87 status = inSection(2);
88 pattern = /abc/;
89 string = 'axc';
90 actualmatch = string.match(pattern);
91 expectedmatch = null;
92 addThis();
93
94 status = inSection(3);
95 pattern = /abc/;
96 string = 'abx';
97 actualmatch = string.match(pattern);
98 expectedmatch = null;
99 addThis();
100
101 status = inSection(4);
102 pattern = /ab+bc/;
103 string = 'abc';
104 actualmatch = string.match(pattern);
105 expectedmatch = null;
106 addThis();
107
108 status = inSection(5);
109 pattern = /ab+bc/;
110 string = 'abq';
111 actualmatch = string.match(pattern);
112 expectedmatch = null;
113 addThis();
114
115 status = inSection(6);
116 pattern = /ab{1,}bc/;
117 string = 'abq';
118 actualmatch = string.match(pattern);
119 expectedmatch = null;
120 addThis();
121
122 status = inSection(7);
123 pattern = /ab{4,5}bc/;
124 string = 'abbbbc';
125 actualmatch = string.match(pattern);
126 expectedmatch = null;
127 addThis();
128
129 status = inSection(8);
130 pattern = /ab?bc/;
131 string = 'abbbbc';
132 actualmatch = string.match(pattern);
133 expectedmatch = null;
134 addThis();
135
136 status = inSection(9);
137 pattern = /^abc$/;
138 string = 'abcc';
139 actualmatch = string.match(pattern);
140 expectedmatch = null;
141 addThis();
142
143 status = inSection(10);
144 pattern = /^abc$/;
145 string = 'aabc';
146 actualmatch = string.match(pattern);
147 expectedmatch = null;
148 addThis();
149
150 status = inSection(11);
151 pattern = /abc$/;
152 string = 'aabcd';
153 actualmatch = string.match(pattern);
154 expectedmatch = null;
155 addThis();
156
157 status = inSection(12);
158 pattern = /a.*c/;
159 string = 'axyzd';
160 actualmatch = string.match(pattern);
161 expectedmatch = null;
162 addThis();
163
164 status = inSection(13);
165 pattern = /a[bc]d/;
166 string = 'abc';
167 actualmatch = string.match(pattern);
168 expectedmatch = null;
169 addThis();
170
171 status = inSection(14);
172 pattern = /a[b-d]e/;
173 string = 'abd';
174 actualmatch = string.match(pattern);
175 expectedmatch = null;
176 addThis();
177
178 status = inSection(15);
179 pattern = /a[^bc]d/;
180 string = 'abd';
181 actualmatch = string.match(pattern);
182 expectedmatch = null;
183 addThis();
184
185 status = inSection(16);
186 pattern = /a[^-b]c/;
187 string = 'a-c';
188 actualmatch = string.match(pattern);
189 expectedmatch = null;
190 addThis();
191
192 status = inSection(17);
193 pattern = /a[^]b]c/;
194 string = 'a]c';
195 actualmatch = string.match(pattern);
196 expectedmatch = null;
197 addThis();
198
199 status = inSection(18);
200 pattern = /\by\b/;
201 string = 'xy';
202 actualmatch = string.match(pattern);
203 expectedmatch = null;
204 addThis();
205
206 status = inSection(19);
207 pattern = /\by\b/;
208 string = 'yz';
209 actualmatch = string.match(pattern);
210 expectedmatch = null;
211 addThis();
212
213 status = inSection(20);
214 pattern = /\by\b/;
215 string = 'xyz';
216 actualmatch = string.match(pattern);
217 expectedmatch = null;
218 addThis();
219
220 status = inSection(21);
221 pattern = /\Ba\B/;
222 string = 'a-';
223 actualmatch = string.match(pattern);
224 expectedmatch = null;
225 addThis();
226
227 status = inSection(22);
228 pattern = /\Ba\B/;
229 string = '-a';
230 actualmatch = string.match(pattern);
231 expectedmatch = null;
232 addThis();
233
234 status = inSection(23);
235 pattern = /\Ba\B/;
236 string = '-a-';
237 actualmatch = string.match(pattern);
238 expectedmatch = null;
239 addThis();
240
241 status = inSection(24);
242 pattern = /\w/;
243 string = '-';
244 actualmatch = string.match(pattern);
245 expectedmatch = null;
246 addThis();
247
248 status = inSection(25);
249 pattern = /\W/;
250 string = 'a';
251 actualmatch = string.match(pattern);
252 expectedmatch = null;
253 addThis();
254
255 status = inSection(26);
256 pattern = /a\sb/;
257 string = 'a-b';
258 actualmatch = string.match(pattern);
259 expectedmatch = null;
260 addThis();
261
262 status = inSection(27);
263 pattern = /\d/;
264 string = '-';
265 actualmatch = string.match(pattern);
266 expectedmatch = null;
267 addThis();
268
269 status = inSection(28);
270 pattern = /\D/;
271 string = '1';
272 actualmatch = string.match(pattern);
273 expectedmatch = null;
274 addThis();
275
276 status = inSection(29);
277 pattern = /[\w]/;
278 string = '-';
279 actualmatch = string.match(pattern);
280 expectedmatch = null;
281 addThis();
282
283 status = inSection(30);
284 pattern = /[\W]/;
285 string = 'a';
286 actualmatch = string.match(pattern);
287 expectedmatch = null;
288 addThis();
289
290 status = inSection(31);
291 pattern = /a[\s]b/;
292 string = 'a-b';
293 actualmatch = string.match(pattern);
294 expectedmatch = null;
295 addThis();
296
297 status = inSection(32);
298 pattern = /[\d]/;
299 string = '-';
300 actualmatch = string.match(pattern);
301 expectedmatch = null;
302 addThis();
303
304 status = inSection(33);
305 pattern = /[\D]/;
306 string = '1';
307 actualmatch = string.match(pattern);
308 expectedmatch = null;
309 addThis();
310
311 status = inSection(34);
312 pattern = /$b/;
313 string = 'b';
314 actualmatch = string.match(pattern);
315 expectedmatch = null;
316 addThis();
317
318 status = inSection(35);
319 pattern = /^(ab|cd)e/;
320 string = 'abcde';
321 actualmatch = string.match(pattern);
322 expectedmatch = null;
323 addThis();
324
325 status = inSection(36);
326 pattern = /a[bcd]+dcdcde/;
327 string = 'adcdcde';
328 actualmatch = string.match(pattern);
329 expectedmatch = null;
330 addThis();
331
332 status = inSection(37);
333 pattern = /(bc+d$|ef*g.|h?i(j|k))/;
334 string = 'effg';
335 actualmatch = string.match(pattern);
336 expectedmatch = null;
337 addThis();
338
339 status = inSection(38);
340 pattern = /(bc+d$|ef*g.|h?i(j|k))/;
341 string = 'bcdd';
342 actualmatch = string.match(pattern);
343 expectedmatch = null;
344 addThis();
345
346 status = inSection(39);
347 pattern = /[k]/;
348 string = 'ab';
349 actualmatch = string.match(pattern);
350 expectedmatch = null;
351 addThis();
352
353 // MODIFIED - ECMA has different rules for paren contents.
354 status = inSection(40);
355 pattern = /(a)|\1/;
356 string = 'x';
357 actualmatch = string.match(pattern);
358 //expectedmatch = null;
359 expectedmatch = Array("", undefined);
360 addThis();
361
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");
369 addThis();
370
371 status = inSection(42);
372 pattern = /abc/i;
373 string = 'XBC';
374 actualmatch = string.match(pattern);
375 expectedmatch = null;
376 addThis();
377
378 status = inSection(43);
379 pattern = /abc/i;
380 string = 'AXC';
381 actualmatch = string.match(pattern);
382 expectedmatch = null;
383 addThis();
384
385 status = inSection(44);
386 pattern = /abc/i;
387 string = 'ABX';
388 actualmatch = string.match(pattern);
389 expectedmatch = null;
390 addThis();
391
392 status = inSection(45);
393 pattern = /ab+bc/i;
394 string = 'ABC';
395 actualmatch = string.match(pattern);
396 expectedmatch = null;
397 addThis();
398
399 status = inSection(46);
400 pattern = /ab+bc/i;
401 string = 'ABQ';
402 actualmatch = string.match(pattern);
403 expectedmatch = null;
404 addThis();
405
406 status = inSection(47);
407 pattern = /ab{1,}bc/i;
408 string = 'ABQ';
409 actualmatch = string.match(pattern);
410 expectedmatch = null;
411 addThis();
412
413 status = inSection(48);
414 pattern = /ab{4,5}?bc/i;
415 string = 'ABBBBC';
416 actualmatch = string.match(pattern);
417 expectedmatch = null;
418 addThis();
419
420 status = inSection(49);
421 pattern = /ab??bc/i;
422 string = 'ABBBBC';
423 actualmatch = string.match(pattern);
424 expectedmatch = null;
425 addThis();
426
427 status = inSection(50);
428 pattern = /^abc$/i;
429 string = 'ABCC';
430 actualmatch = string.match(pattern);
431 expectedmatch = null;
432 addThis();
433
434 status = inSection(51);
435 pattern = /^abc$/i;
436 string = 'AABC';
437 actualmatch = string.match(pattern);
438 expectedmatch = null;
439 addThis();
440
441 status = inSection(52);
442 pattern = /a.*c/i;
443 string = 'AXYZD';
444 actualmatch = string.match(pattern);
445 expectedmatch = null;
446 addThis();
447
448 status = inSection(53);
449 pattern = /a[bc]d/i;
450 string = 'ABC';
451 actualmatch = string.match(pattern);
452 expectedmatch = null;
453 addThis();
454
455 status = inSection(54);
456 pattern = /a[b-d]e/i;
457 string = 'ABD';
458 actualmatch = string.match(pattern);
459 expectedmatch = null;
460 addThis();
461
462 status = inSection(55);
463 pattern = /a[^bc]d/i;
464 string = 'ABD';
465 actualmatch = string.match(pattern);
466 expectedmatch = null;
467 addThis();
468
469 status = inSection(56);
470 pattern = /a[^-b]c/i;
471 string = 'A-C';
472 actualmatch = string.match(pattern);
473 expectedmatch = null;
474 addThis();
475
476 status = inSection(57);
477 pattern = /a[^]b]c/i;
478 string = 'A]C';
479 actualmatch = string.match(pattern);
480 expectedmatch = null;
481 addThis();
482
483 status = inSection(58);
484 pattern = /$b/i;
485 string = 'B';
486 actualmatch = string.match(pattern);
487 expectedmatch = null;
488 addThis();
489
490 status = inSection(59);
491 pattern = /^(ab|cd)e/i;
492 string = 'ABCDE';
493 actualmatch = string.match(pattern);
494 expectedmatch = null;
495 addThis();
496
497 status = inSection(60);
498 pattern = /a[bcd]+dcdcde/i;
499 string = 'ADCDCDE';
500 actualmatch = string.match(pattern);
501 expectedmatch = null;
502 addThis();
503
504 status = inSection(61);
505 pattern = /(bc+d$|ef*g.|h?i(j|k))/i;
506 string = 'EFFG';
507 actualmatch = string.match(pattern);
508 expectedmatch = null;
509 addThis();
510
511 status = inSection(62);
512 pattern = /(bc+d$|ef*g.|h?i(j|k))/i;
513 string = 'BCDD';
514 actualmatch = string.match(pattern);
515 expectedmatch = null;
516 addThis();
517
518 status = inSection(63);
519 pattern = /[k]/i;
520 string = 'AB';
521 actualmatch = string.match(pattern);
522 expectedmatch = null;
523 addThis();
524
525 status = inSection(64);
526 pattern = /^(a\1?){4}$/;
527 string = 'aaaaaaaaa';
528 actualmatch = string.match(pattern);
529 expectedmatch = null;
530 addThis();
531
532 status = inSection(65);
533 pattern = /^(a\1?){4}$/;
534 string = 'aaaaaaaaaaa';
535 actualmatch = string.match(pattern);
536 expectedmatch = null;
537 addThis();
538
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;
545    addThis();
546
547    status = inSection(67);
548    pattern = /^(a(?(1)\1)){4}$/;
549    string = 'aaaaaaaaaaa';
550    actualmatch = string.match(pattern);
551    expectedmatch = null;
552    addThis();
553 */
554
555 /* ECMA doesn't support (?<
556    status = inSection(68);
557    pattern = /(?<=a)b/;
558    string = 'cb';
559    actualmatch = string.match(pattern);
560    expectedmatch = null;
561    addThis();
562
563    status = inSection(69);
564    pattern = /(?<=a)b/;
565    string = 'b';
566    actualmatch = string.match(pattern);
567    expectedmatch = null;
568    addThis();
569
570    status = inSection(70);
571    pattern = /(?<!c)b/;
572    string = 'cb';
573    actualmatch = string.match(pattern);
574    expectedmatch = null;
575    addThis();
576 */
577
578 /* ECMA doesn't support (?(condition)
579    status = inSection(71);
580    pattern = /(?:(?i)a)b/;
581    string = 'aB';
582    actualmatch = string.match(pattern);
583    expectedmatch = null;
584    addThis();
585
586    status = inSection(72);
587    pattern = /((?i)a)b/;
588    string = 'aB';
589    actualmatch = string.match(pattern);
590    expectedmatch = null;
591    addThis();
592
593    status = inSection(73);
594    pattern = /(?i:a)b/;
595    string = 'aB';
596    actualmatch = string.match(pattern);
597    expectedmatch = null;
598    addThis();
599
600    status = inSection(74);
601    pattern = /((?i:a))b/;
602    string = 'aB';
603    actualmatch = string.match(pattern);
604    expectedmatch = null;
605    addThis();
606
607    status = inSection(75);
608    pattern = /(?:(?-i)a)b/i;
609    string = 'Ab';
610    actualmatch = string.match(pattern);
611    expectedmatch = null;
612    addThis();
613
614    status = inSection(76);
615    pattern = /((?-i)a)b/i;
616    string = 'Ab';
617    actualmatch = string.match(pattern);
618    expectedmatch = null;
619    addThis();
620
621    status = inSection(77);
622    pattern = /(?:(?-i)a)b/i;
623    string = 'AB';
624    actualmatch = string.match(pattern);
625    expectedmatch = null;
626    addThis();
627
628    status = inSection(78);
629    pattern = /((?-i)a)b/i;
630    string = 'AB';
631    actualmatch = string.match(pattern);
632    expectedmatch = null;
633    addThis();
634
635    status = inSection(79);
636    pattern = /(?-i:a)b/i;
637    string = 'Ab';
638    actualmatch = string.match(pattern);
639    expectedmatch = null;
640    addThis();
641
642    status = inSection(80);
643    pattern = /((?-i:a))b/i;
644    string = 'Ab';
645    actualmatch = string.match(pattern);
646    expectedmatch = null;
647    addThis();
648
649    status = inSection(81);
650    pattern = /(?-i:a)b/i;
651    string = 'AB';
652    actualmatch = string.match(pattern);
653    expectedmatch = null;
654    addThis();
655
656    status = inSection(82);
657    pattern = /((?-i:a))b/i;
658    string = 'AB';
659    actualmatch = string.match(pattern);
660    expectedmatch = null;
661    addThis();
662
663    status = inSection(83);
664    pattern = /((?-i:a.))b/i;
665    string = 'a\nB';
666    actualmatch = string.match(pattern);
667    expectedmatch = null;
668    addThis();
669
670    status = inSection(84);
671    pattern = /((?s-i:a.))b/i;
672    string = 'B\nB';
673    actualmatch = string.match(pattern);
674    expectedmatch = null;
675    addThis();
676 */
677
678 /* ECMA doesn't support (?<
679    status = inSection(85);
680    pattern = /(?<![cd])b/;
681    string = 'dbcb';
682    actualmatch = string.match(pattern);
683    expectedmatch = null;
684    addThis();
685
686    status = inSection(86);
687    pattern = /(?<!(c|d))b/;
688    string = 'dbcb';
689    actualmatch = string.match(pattern);
690    expectedmatch = null;
691    addThis();
692 */
693
694 status = inSection(87);
695 pattern = /^(?:a?b?)*$/;
696 string = 'a--';
697 actualmatch = string.match(pattern);
698 expectedmatch = null;
699 addThis();
700
701 status = inSection(88);
702 pattern = /^b/;
703 string = 'a\nb\nc\n';
704 actualmatch = string.match(pattern);
705 expectedmatch = null;
706 addThis();
707
708 status = inSection(89);
709 pattern = /()^b/;
710 string = 'a\nb\nc\n';
711 actualmatch = string.match(pattern);
712 expectedmatch = null;
713 addThis();
714
715 /* ECMA doesn't support (?(
716    status = inSection(90);
717    pattern = /(?(1)a|b)/;
718    string = 'a';
719    actualmatch = string.match(pattern);
720    expectedmatch = null;
721    addThis();
722
723    status = inSection(91);
724    pattern = /(x)?(?(1)a|b)/;
725    string = 'a';
726    actualmatch = string.match(pattern);
727    expectedmatch = null;
728    addThis();
729
730    status = inSection(92);
731    pattern = /()(?(1)b|a)/;
732    string = 'a';
733    actualmatch = string.match(pattern);
734    expectedmatch = null;
735    addThis();
736
737    status = inSection(93);
738    pattern = /^(\()?blah(?(1)(\)))$/;
739    string = 'blah)';
740    actualmatch = string.match(pattern);
741    expectedmatch = null;
742    addThis();
743
744    status = inSection(94);
745    pattern = /^(\()?blah(?(1)(\)))$/;
746    string = '(blah';
747    actualmatch = string.match(pattern);
748    expectedmatch = null;
749    addThis();
750
751    status = inSection(95);
752    pattern = /^(\(+)?blah(?(1)(\)))$/;
753    string = 'blah)';
754    actualmatch = string.match(pattern);
755    expectedmatch = null;
756    addThis();
757
758    status = inSection(96);
759    pattern = /^(\(+)?blah(?(1)(\)))$/;
760    string = '(blah';
761    actualmatch = string.match(pattern);
762    expectedmatch = null;
763    addThis();
764
765    status = inSection(97);
766    pattern = /(?(?{0})a|b)/;
767    string = 'a';
768    actualmatch = string.match(pattern);
769    expectedmatch = null;
770    addThis();
771
772    status = inSection(98);
773    pattern = /(?(?{1})b|a)/;
774    string = 'a';
775    actualmatch = string.match(pattern);
776    expectedmatch = null;
777    addThis();
778
779    status = inSection(99);
780    pattern = /(?(?!a)a|b)/;
781    string = 'a';
782    actualmatch = string.match(pattern);
783    expectedmatch = null;
784    addThis();
785
786    status = inSection(100);
787    pattern = /(?(?=a)b|a)/;
788    string = 'a';
789    actualmatch = string.match(pattern);
790    expectedmatch = null;
791    addThis();
792 */
793
794 status = inSection(101);
795 pattern = /^(?=(a+?))\1ab/;
796 string = 'aaab';
797 actualmatch = string.match(pattern);
798 expectedmatch = null;
799 addThis();
800
801 status = inSection(102);
802 pattern = /^(?=(a+?))\1ab/;
803 string = 'aaab';
804 actualmatch = string.match(pattern);
805 expectedmatch = null;
806 addThis();
807
808 status = inSection(103);
809 pattern = /([\w:]+::)?(\w+)$/;
810 string = 'abcd:';
811 actualmatch = string.match(pattern);
812 expectedmatch = null;
813 addThis();
814
815 status = inSection(104);
816 pattern = /([\w:]+::)?(\w+)$/;
817 string = 'abcd:';
818 actualmatch = string.match(pattern);
819 expectedmatch = null;
820 addThis();
821
822 status = inSection(105);
823 pattern = /(>a+)ab/;
824 string = 'aaab';
825 actualmatch = string.match(pattern);
826 expectedmatch = null;
827 addThis();
828
829 status = inSection(106);
830 pattern = /a\Z/;
831 string = 'a\nb\n';
832 actualmatch = string.match(pattern);
833 expectedmatch = null;
834 addThis();
835
836 status = inSection(107);
837 pattern = /a\z/;
838 string = 'a\nb\n';
839 actualmatch = string.match(pattern);
840 expectedmatch = null;
841 addThis();
842
843 status = inSection(108);
844 pattern = /a$/;
845 string = 'a\nb\n';
846 actualmatch = string.match(pattern);
847 expectedmatch = null;
848 addThis();
849
850 status = inSection(109);
851 pattern = /a\z/;
852 string = 'b\na\n';
853 actualmatch = string.match(pattern);
854 expectedmatch = null;
855 addThis();
856
857 status = inSection(110);
858 pattern = /a\z/m;
859 string = 'a\nb\n';
860 actualmatch = string.match(pattern);
861 expectedmatch = null;
862 addThis();
863
864 status = inSection(111);
865 pattern = /a\z/m;
866 string = 'b\na\n';
867 actualmatch = string.match(pattern);
868 expectedmatch = null;
869 addThis();
870
871 status = inSection(112);
872 pattern = /aa\Z/;
873 string = 'aa\nb\n';
874 actualmatch = string.match(pattern);
875 expectedmatch = null;
876 addThis();
877
878 status = inSection(113);
879 pattern = /aa\z/;
880 string = 'aa\nb\n';
881 actualmatch = string.match(pattern);
882 expectedmatch = null;
883 addThis();
884
885 status = inSection(114);
886 pattern = /aa$/;
887 string = 'aa\nb\n';
888 actualmatch = string.match(pattern);
889 expectedmatch = null;
890 addThis();
891
892 status = inSection(115);
893 pattern = /aa\z/;
894 string = 'b\naa\n';
895 actualmatch = string.match(pattern);
896 expectedmatch = null;
897 addThis();
898
899 status = inSection(116);
900 pattern = /aa\z/m;
901 string = 'aa\nb\n';
902 actualmatch = string.match(pattern);
903 expectedmatch = null;
904 addThis();
905
906 status = inSection(117);
907 pattern = /aa\z/m;
908 string = 'b\naa\n';
909 actualmatch = string.match(pattern);
910 expectedmatch = null;
911 addThis();
912
913 status = inSection(118);
914 pattern = /aa\Z/;
915 string = 'ac\nb\n';
916 actualmatch = string.match(pattern);
917 expectedmatch = null;
918 addThis();
919
920 status = inSection(119);
921 pattern = /aa\z/;
922 string = 'ac\nb\n';
923 actualmatch = string.match(pattern);
924 expectedmatch = null;
925 addThis();
926
927 status = inSection(120);
928 pattern = /aa$/;
929 string = 'ac\nb\n';
930 actualmatch = string.match(pattern);
931 expectedmatch = null;
932 addThis();
933
934 status = inSection(121);
935 pattern = /aa\Z/;
936 string = 'b\nac\n';
937 actualmatch = string.match(pattern);
938 expectedmatch = null;
939 addThis();
940
941 status = inSection(122);
942 pattern = /aa\z/;
943 string = 'b\nac\n';
944 actualmatch = string.match(pattern);
945 expectedmatch = null;
946 addThis();
947
948 status = inSection(123);
949 pattern = /aa$/;
950 string = 'b\nac\n';
951 actualmatch = string.match(pattern);
952 expectedmatch = null;
953 addThis();
954
955 status = inSection(124);
956 pattern = /aa\Z/;
957 string = 'b\nac';
958 actualmatch = string.match(pattern);
959 expectedmatch = null;
960 addThis();
961
962 status = inSection(125);
963 pattern = /aa\z/;
964 string = 'b\nac';
965 actualmatch = string.match(pattern);
966 expectedmatch = null;
967 addThis();
968
969 status = inSection(126);
970 pattern = /aa$/;
971 string = 'b\nac';
972 actualmatch = string.match(pattern);
973 expectedmatch = null;
974 addThis();
975
976 status = inSection(127);
977 pattern = /aa\Z/m;
978 string = 'ac\nb\n';
979 actualmatch = string.match(pattern);
980 expectedmatch = null;
981 addThis();
982
983 status = inSection(128);
984 pattern = /aa\z/m;
985 string = 'ac\nb\n';
986 actualmatch = string.match(pattern);
987 expectedmatch = null;
988 addThis();
989
990 status = inSection(129);
991 pattern = /aa$/m;
992 string = 'ac\nb\n';
993 actualmatch = string.match(pattern);
994 expectedmatch = null;
995 addThis();
996
997 status = inSection(130);
998 pattern = /aa\Z/m;
999 string = 'b\nac\n';
1000 actualmatch = string.match(pattern);
1001 expectedmatch = null;
1002 addThis();
1003
1004 status = inSection(131);
1005 pattern = /aa\z/m;
1006 string = 'b\nac\n';
1007 actualmatch = string.match(pattern);
1008 expectedmatch = null;
1009 addThis();
1010
1011 status = inSection(132);
1012 pattern = /aa$/m;
1013 string = 'b\nac\n';
1014 actualmatch = string.match(pattern);
1015 expectedmatch = null;
1016 addThis();
1017
1018 status = inSection(133);
1019 pattern = /aa\Z/m;
1020 string = 'b\nac';
1021 actualmatch = string.match(pattern);
1022 expectedmatch = null;
1023 addThis();
1024
1025 status = inSection(134);
1026 pattern = /aa\z/m;
1027 string = 'b\nac';
1028 actualmatch = string.match(pattern);
1029 expectedmatch = null;
1030 addThis();
1031
1032 status = inSection(135);
1033 pattern = /aa$/m;
1034 string = 'b\nac';
1035 actualmatch = string.match(pattern);
1036 expectedmatch = null;
1037 addThis();
1038
1039 status = inSection(136);
1040 pattern = /aa\Z/;
1041 string = 'ca\nb\n';
1042 actualmatch = string.match(pattern);
1043 expectedmatch = null;
1044 addThis();
1045
1046 status = inSection(137);
1047 pattern = /aa\z/;
1048 string = 'ca\nb\n';
1049 actualmatch = string.match(pattern);
1050 expectedmatch = null;
1051 addThis();
1052
1053 status = inSection(138);
1054 pattern = /aa$/;
1055 string = 'ca\nb\n';
1056 actualmatch = string.match(pattern);
1057 expectedmatch = null;
1058 addThis();
1059
1060 status = inSection(139);
1061 pattern = /aa\Z/;
1062 string = 'b\nca\n';
1063 actualmatch = string.match(pattern);
1064 expectedmatch = null;
1065 addThis();
1066
1067 status = inSection(140);
1068 pattern = /aa\z/;
1069 string = 'b\nca\n';
1070 actualmatch = string.match(pattern);
1071 expectedmatch = null;
1072 addThis();
1073
1074 status = inSection(141);
1075 pattern = /aa$/;
1076 string = 'b\nca\n';
1077 actualmatch = string.match(pattern);
1078 expectedmatch = null;
1079 addThis();
1080
1081 status = inSection(142);
1082 pattern = /aa\Z/;
1083 string = 'b\nca';
1084 actualmatch = string.match(pattern);
1085 expectedmatch = null;
1086 addThis();
1087
1088 status = inSection(143);
1089 pattern = /aa\z/;
1090 string = 'b\nca';
1091 actualmatch = string.match(pattern);
1092 expectedmatch = null;
1093 addThis();
1094
1095 status = inSection(144);
1096 pattern = /aa$/;
1097 string = 'b\nca';
1098 actualmatch = string.match(pattern);
1099 expectedmatch = null;
1100 addThis();
1101
1102 status = inSection(145);
1103 pattern = /aa\Z/m;
1104 string = 'ca\nb\n';
1105 actualmatch = string.match(pattern);
1106 expectedmatch = null;
1107 addThis();
1108
1109 status = inSection(146);
1110 pattern = /aa\z/m;
1111 string = 'ca\nb\n';
1112 actualmatch = string.match(pattern);
1113 expectedmatch = null;
1114 addThis();
1115
1116 status = inSection(147);
1117 pattern = /aa$/m;
1118 string = 'ca\nb\n';
1119 actualmatch = string.match(pattern);
1120 expectedmatch = null;
1121 addThis();
1122
1123 status = inSection(148);
1124 pattern = /aa\Z/m;
1125 string = 'b\nca\n';
1126 actualmatch = string.match(pattern);
1127 expectedmatch = null;
1128 addThis();
1129
1130 status = inSection(149);
1131 pattern = /aa\z/m;
1132 string = 'b\nca\n';
1133 actualmatch = string.match(pattern);
1134 expectedmatch = null;
1135 addThis();
1136
1137 status = inSection(150);
1138 pattern = /aa$/m;
1139 string = 'b\nca\n';
1140 actualmatch = string.match(pattern);
1141 expectedmatch = null;
1142 addThis();
1143
1144 status = inSection(151);
1145 pattern = /aa\Z/m;
1146 string = 'b\nca';
1147 actualmatch = string.match(pattern);
1148 expectedmatch = null;
1149 addThis();
1150
1151 status = inSection(152);
1152 pattern = /aa\z/m;
1153 string = 'b\nca';
1154 actualmatch = string.match(pattern);
1155 expectedmatch = null;
1156 addThis();
1157
1158 status = inSection(153);
1159 pattern = /aa$/m;
1160 string = 'b\nca';
1161 actualmatch = string.match(pattern);
1162 expectedmatch = null;
1163 addThis();
1164
1165 status = inSection(154);
1166 pattern = /ab\Z/;
1167 string = 'ab\nb\n';
1168 actualmatch = string.match(pattern);
1169 expectedmatch = null;
1170 addThis();
1171
1172 status = inSection(155);
1173 pattern = /ab\z/;
1174 string = 'ab\nb\n';
1175 actualmatch = string.match(pattern);
1176 expectedmatch = null;
1177 addThis();
1178
1179 status = inSection(156);
1180 pattern = /ab$/;
1181 string = 'ab\nb\n';
1182 actualmatch = string.match(pattern);
1183 expectedmatch = null;
1184 addThis();
1185
1186 status = inSection(157);
1187 pattern = /ab\z/;
1188 string = 'b\nab\n';
1189 actualmatch = string.match(pattern);
1190 expectedmatch = null;
1191 addThis();
1192
1193 status = inSection(158);
1194 pattern = /ab\z/m;
1195 string = 'ab\nb\n';
1196 actualmatch = string.match(pattern);
1197 expectedmatch = null;
1198 addThis();
1199
1200 status = inSection(159);
1201 pattern = /ab\z/m;
1202 string = 'b\nab\n';
1203 actualmatch = string.match(pattern);
1204 expectedmatch = null;
1205 addThis();
1206
1207 status = inSection(160);
1208 pattern = /ab\Z/;
1209 string = 'ac\nb\n';
1210 actualmatch = string.match(pattern);
1211 expectedmatch = null;
1212 addThis();
1213
1214 status = inSection(161);
1215 pattern = /ab\z/;
1216 string = 'ac\nb\n';
1217 actualmatch = string.match(pattern);
1218 expectedmatch = null;
1219 addThis();
1220
1221 status = inSection(162);
1222 pattern = /ab$/;
1223 string = 'ac\nb\n';
1224 actualmatch = string.match(pattern);
1225 expectedmatch = null;
1226 addThis();
1227
1228 status = inSection(163);
1229 pattern = /ab\Z/;
1230 string = 'b\nac\n';
1231 actualmatch = string.match(pattern);
1232 expectedmatch = null;
1233 addThis();
1234
1235 status = inSection(164);
1236 pattern = /ab\z/;
1237 string = 'b\nac\n';
1238 actualmatch = string.match(pattern);
1239 expectedmatch = null;
1240 addThis();
1241
1242 status = inSection(165);
1243 pattern = /ab$/;
1244 string = 'b\nac\n';
1245 actualmatch = string.match(pattern);
1246 expectedmatch = null;
1247 addThis();
1248
1249 status = inSection(166);
1250 pattern = /ab\Z/;
1251 string = 'b\nac';
1252 actualmatch = string.match(pattern);
1253 expectedmatch = null;
1254 addThis();
1255
1256 status = inSection(167);
1257 pattern = /ab\z/;
1258 string = 'b\nac';
1259 actualmatch = string.match(pattern);
1260 expectedmatch = null;
1261 addThis();
1262
1263 status = inSection(168);
1264 pattern = /ab$/;
1265 string = 'b\nac';
1266 actualmatch = string.match(pattern);
1267 expectedmatch = null;
1268 addThis();
1269
1270 status = inSection(169);
1271 pattern = /ab\Z/m;
1272 string = 'ac\nb\n';
1273 actualmatch = string.match(pattern);
1274 expectedmatch = null;
1275 addThis();
1276
1277 status = inSection(170);
1278 pattern = /ab\z/m;
1279 string = 'ac\nb\n';
1280 actualmatch = string.match(pattern);
1281 expectedmatch = null;
1282 addThis();
1283
1284 status = inSection(171);
1285 pattern = /ab$/m;
1286 string = 'ac\nb\n';
1287 actualmatch = string.match(pattern);
1288 expectedmatch = null;
1289 addThis();
1290
1291 status = inSection(172);
1292 pattern = /ab\Z/m;
1293 string = 'b\nac\n';
1294 actualmatch = string.match(pattern);
1295 expectedmatch = null;
1296 addThis();
1297
1298 status = inSection(173);
1299 pattern = /ab\z/m;
1300 string = 'b\nac\n';
1301 actualmatch = string.match(pattern);
1302 expectedmatch = null;
1303 addThis();
1304
1305 status = inSection(174);
1306 pattern = /ab$/m;
1307 string = 'b\nac\n';
1308 actualmatch = string.match(pattern);
1309 expectedmatch = null;
1310 addThis();
1311
1312 status = inSection(175);
1313 pattern = /ab\Z/m;
1314 string = 'b\nac';
1315 actualmatch = string.match(pattern);
1316 expectedmatch = null;
1317 addThis();
1318
1319 status = inSection(176);
1320 pattern = /ab\z/m;
1321 string = 'b\nac';
1322 actualmatch = string.match(pattern);
1323 expectedmatch = null;
1324 addThis();
1325
1326 status = inSection(177);
1327 pattern = /ab$/m;
1328 string = 'b\nac';
1329 actualmatch = string.match(pattern);
1330 expectedmatch = null;
1331 addThis();
1332
1333 status = inSection(178);
1334 pattern = /ab\Z/;
1335 string = 'ca\nb\n';
1336 actualmatch = string.match(pattern);
1337 expectedmatch = null;
1338 addThis();
1339
1340 status = inSection(179);
1341 pattern = /ab\z/;
1342 string = 'ca\nb\n';
1343 actualmatch = string.match(pattern);
1344 expectedmatch = null;
1345 addThis();
1346
1347 status = inSection(180);
1348 pattern = /ab$/;
1349 string = 'ca\nb\n';
1350 actualmatch = string.match(pattern);
1351 expectedmatch = null;
1352 addThis();
1353
1354 status = inSection(181);
1355 pattern = /ab\Z/;
1356 string = 'b\nca\n';
1357 actualmatch = string.match(pattern);
1358 expectedmatch = null;
1359 addThis();
1360
1361 status = inSection(182);
1362 pattern = /ab\z/;
1363 string = 'b\nca\n';
1364 actualmatch = string.match(pattern);
1365 expectedmatch = null;
1366 addThis();
1367
1368 status = inSection(183);
1369 pattern = /ab$/;
1370 string = 'b\nca\n';
1371 actualmatch = string.match(pattern);
1372 expectedmatch = null;
1373 addThis();
1374
1375 status = inSection(184);
1376 pattern = /ab\Z/;
1377 string = 'b\nca';
1378 actualmatch = string.match(pattern);
1379 expectedmatch = null;
1380 addThis();
1381
1382 status = inSection(185);
1383 pattern = /ab\z/;
1384 string = 'b\nca';
1385 actualmatch = string.match(pattern);
1386 expectedmatch = null;
1387 addThis();
1388
1389 status = inSection(186);
1390 pattern = /ab$/;
1391 string = 'b\nca';
1392 actualmatch = string.match(pattern);
1393 expectedmatch = null;
1394 addThis();
1395
1396 status = inSection(187);
1397 pattern = /ab\Z/m;
1398 string = 'ca\nb\n';
1399 actualmatch = string.match(pattern);
1400 expectedmatch = null;
1401 addThis();
1402
1403 status = inSection(188);
1404 pattern = /ab\z/m;
1405 string = 'ca\nb\n';
1406 actualmatch = string.match(pattern);
1407 expectedmatch = null;
1408 addThis();
1409
1410 status = inSection(189);
1411 pattern = /ab$/m;
1412 string = 'ca\nb\n';
1413 actualmatch = string.match(pattern);
1414 expectedmatch = null;
1415 addThis();
1416
1417 status = inSection(190);
1418 pattern = /ab\Z/m;
1419 string = 'b\nca\n';
1420 actualmatch = string.match(pattern);
1421 expectedmatch = null;
1422 addThis();
1423
1424 status = inSection(191);
1425 pattern = /ab\z/m;
1426 string = 'b\nca\n';
1427 actualmatch = string.match(pattern);
1428 expectedmatch = null;
1429 addThis();
1430
1431 status = inSection(192);
1432 pattern = /ab$/m;
1433 string = 'b\nca\n';
1434 actualmatch = string.match(pattern);
1435 expectedmatch = null;
1436 addThis();
1437
1438 status = inSection(193);
1439 pattern = /ab\Z/m;
1440 string = 'b\nca';
1441 actualmatch = string.match(pattern);
1442 expectedmatch = null;
1443 addThis();
1444
1445 status = inSection(194);
1446 pattern = /ab\z/m;
1447 string = 'b\nca';
1448 actualmatch = string.match(pattern);
1449 expectedmatch = null;
1450 addThis();
1451
1452 status = inSection(195);
1453 pattern = /ab$/m;
1454 string = 'b\nca';
1455 actualmatch = string.match(pattern);
1456 expectedmatch = null;
1457 addThis();
1458
1459 status = inSection(196);
1460 pattern = /abb\Z/;
1461 string = 'abb\nb\n';
1462 actualmatch = string.match(pattern);
1463 expectedmatch = null;
1464 addThis();
1465
1466 status = inSection(197);
1467 pattern = /abb\z/;
1468 string = 'abb\nb\n';
1469 actualmatch = string.match(pattern);
1470 expectedmatch = null;
1471 addThis();
1472
1473 status = inSection(198);
1474 pattern = /abb$/;
1475 string = 'abb\nb\n';
1476 actualmatch = string.match(pattern);
1477 expectedmatch = null;
1478 addThis();
1479
1480 status = inSection(199);
1481 pattern = /abb\z/;
1482 string = 'b\nabb\n';
1483 actualmatch = string.match(pattern);
1484 expectedmatch = null;
1485 addThis();
1486
1487 status = inSection(200);
1488 pattern = /abb\z/m;
1489 string = 'abb\nb\n';
1490 actualmatch = string.match(pattern);
1491 expectedmatch = null;
1492 addThis();
1493
1494 status = inSection(201);
1495 pattern = /abb\z/m;
1496 string = 'b\nabb\n';
1497 actualmatch = string.match(pattern);
1498 expectedmatch = null;
1499 addThis();
1500
1501 status = inSection(202);
1502 pattern = /abb\Z/;
1503 string = 'ac\nb\n';
1504 actualmatch = string.match(pattern);
1505 expectedmatch = null;
1506 addThis();
1507
1508 status = inSection(203);
1509 pattern = /abb\z/;
1510 string = 'ac\nb\n';
1511 actualmatch = string.match(pattern);
1512 expectedmatch = null;
1513 addThis();
1514
1515 status = inSection(204);
1516 pattern = /abb$/;
1517 string = 'ac\nb\n';
1518 actualmatch = string.match(pattern);
1519 expectedmatch = null;
1520 addThis();
1521
1522 status = inSection(205);
1523 pattern = /abb\Z/;
1524 string = 'b\nac\n';
1525 actualmatch = string.match(pattern);
1526 expectedmatch = null;
1527 addThis();
1528
1529 status = inSection(206);
1530 pattern = /abb\z/;
1531 string = 'b\nac\n';
1532 actualmatch = string.match(pattern);
1533 expectedmatch = null;
1534 addThis();
1535
1536 status = inSection(207);
1537 pattern = /abb$/;
1538 string = 'b\nac\n';
1539 actualmatch = string.match(pattern);
1540 expectedmatch = null;
1541 addThis();
1542
1543 status = inSection(208);
1544 pattern = /abb\Z/;
1545 string = 'b\nac';
1546 actualmatch = string.match(pattern);
1547 expectedmatch = null;
1548 addThis();
1549
1550 status = inSection(209);
1551 pattern = /abb\z/;
1552 string = 'b\nac';
1553 actualmatch = string.match(pattern);
1554 expectedmatch = null;
1555 addThis();
1556
1557 status = inSection(210);
1558 pattern = /abb$/;
1559 string = 'b\nac';
1560 actualmatch = string.match(pattern);
1561 expectedmatch = null;
1562 addThis();
1563
1564 status = inSection(211);
1565 pattern = /abb\Z/m;
1566 string = 'ac\nb\n';
1567 actualmatch = string.match(pattern);
1568 expectedmatch = null;
1569 addThis();
1570
1571 status = inSection(212);
1572 pattern = /abb\z/m;
1573 string = 'ac\nb\n';
1574 actualmatch = string.match(pattern);
1575 expectedmatch = null;
1576 addThis();
1577
1578 status = inSection(213);
1579 pattern = /abb$/m;
1580 string = 'ac\nb\n';
1581 actualmatch = string.match(pattern);
1582 expectedmatch = null;
1583 addThis();
1584
1585 status = inSection(214);
1586 pattern = /abb\Z/m;
1587 string = 'b\nac\n';
1588 actualmatch = string.match(pattern);
1589 expectedmatch = null;
1590 addThis();
1591
1592 status = inSection(215);
1593 pattern = /abb\z/m;
1594 string = 'b\nac\n';
1595 actualmatch = string.match(pattern);
1596 expectedmatch = null;
1597 addThis();
1598
1599 status = inSection(216);
1600 pattern = /abb$/m;
1601 string = 'b\nac\n';
1602 actualmatch = string.match(pattern);
1603 expectedmatch = null;
1604 addThis();
1605
1606 status = inSection(217);
1607 pattern = /abb\Z/m;
1608 string = 'b\nac';
1609 actualmatch = string.match(pattern);
1610 expectedmatch = null;
1611 addThis();
1612
1613 status = inSection(218);
1614 pattern = /abb\z/m;
1615 string = 'b\nac';
1616 actualmatch = string.match(pattern);
1617 expectedmatch = null;
1618 addThis();
1619
1620 status = inSection(219);
1621 pattern = /abb$/m;
1622 string = 'b\nac';
1623 actualmatch = string.match(pattern);
1624 expectedmatch = null;
1625 addThis();
1626
1627 status = inSection(220);
1628 pattern = /abb\Z/;
1629 string = 'ca\nb\n';
1630 actualmatch = string.match(pattern);
1631 expectedmatch = null;
1632 addThis();
1633
1634 status = inSection(221);
1635 pattern = /abb\z/;
1636 string = 'ca\nb\n';
1637 actualmatch = string.match(pattern);
1638 expectedmatch = null;
1639 addThis();
1640
1641 status = inSection(222);
1642 pattern = /abb$/;
1643 string = 'ca\nb\n';
1644 actualmatch = string.match(pattern);
1645 expectedmatch = null;
1646 addThis();
1647
1648 status = inSection(223);
1649 pattern = /abb\Z/;
1650 string = 'b\nca\n';
1651 actualmatch = string.match(pattern);
1652 expectedmatch = null;
1653 addThis();
1654
1655 status = inSection(224);
1656 pattern = /abb\z/;
1657 string = 'b\nca\n';
1658 actualmatch = string.match(pattern);
1659 expectedmatch = null;
1660 addThis();
1661
1662 status = inSection(225);
1663 pattern = /abb$/;
1664 string = 'b\nca\n';
1665 actualmatch = string.match(pattern);
1666 expectedmatch = null;
1667 addThis();
1668
1669 status = inSection(226);
1670 pattern = /abb\Z/;
1671 string = 'b\nca';
1672 actualmatch = string.match(pattern);
1673 expectedmatch = null;
1674 addThis();
1675
1676 status = inSection(227);
1677 pattern = /abb\z/;
1678 string = 'b\nca';
1679 actualmatch = string.match(pattern);
1680 expectedmatch = null;
1681 addThis();
1682
1683 status = inSection(228);
1684 pattern = /abb$/;
1685 string = 'b\nca';
1686 actualmatch = string.match(pattern);
1687 expectedmatch = null;
1688 addThis();
1689
1690 status = inSection(229);
1691 pattern = /abb\Z/m;
1692 string = 'ca\nb\n';
1693 actualmatch = string.match(pattern);
1694 expectedmatch = null;
1695 addThis();
1696
1697 status = inSection(230);
1698 pattern = /abb\z/m;
1699 string = 'ca\nb\n';
1700 actualmatch = string.match(pattern);
1701 expectedmatch = null;
1702 addThis();
1703
1704 status = inSection(231);
1705 pattern = /abb$/m;
1706 string = 'ca\nb\n';
1707 actualmatch = string.match(pattern);
1708 expectedmatch = null;
1709 addThis();
1710
1711 status = inSection(232);
1712 pattern = /abb\Z/m;
1713 string = 'b\nca\n';
1714 actualmatch = string.match(pattern);
1715 expectedmatch = null;
1716 addThis();
1717
1718 status = inSection(233);
1719 pattern = /abb\z/m;
1720 string = 'b\nca\n';
1721 actualmatch = string.match(pattern);
1722 expectedmatch = null;
1723 addThis();
1724
1725 status = inSection(234);
1726 pattern = /abb$/m;
1727 string = 'b\nca\n';
1728 actualmatch = string.match(pattern);
1729 expectedmatch = null;
1730 addThis();
1731
1732 status = inSection(235);
1733 pattern = /abb\Z/m;
1734 string = 'b\nca';
1735 actualmatch = string.match(pattern);
1736 expectedmatch = null;
1737 addThis();
1738
1739 status = inSection(236);
1740 pattern = /abb\z/m;
1741 string = 'b\nca';
1742 actualmatch = string.match(pattern);
1743 expectedmatch = null;
1744 addThis();
1745
1746 status = inSection(237);
1747 pattern = /abb$/m;
1748 string = 'b\nca';
1749 actualmatch = string.match(pattern);
1750 expectedmatch = null;
1751 addThis();
1752
1753 status = inSection(238);
1754 pattern = /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/;
1755 string = 'x';
1756 actualmatch = string.match(pattern);
1757 expectedmatch = null;
1758 addThis();
1759
1760 status = inSection(239);
1761 pattern = /\GX.*X/;
1762 string = 'aaaXbX';
1763 actualmatch = string.match(pattern);
1764 expectedmatch = null;
1765 addThis();
1766
1767 status = inSection(240);
1768 pattern = /\.c(pp|xx|c)?$/i;
1769 string = 'Changes';
1770 actualmatch = string.match(pattern);
1771 expectedmatch = null;
1772 addThis();
1773
1774 status = inSection(241);
1775 pattern = /^([a-z]:)/;
1776 string = 'C:/';
1777 actualmatch = string.match(pattern);
1778 expectedmatch = null;
1779 addThis();
1780
1781 status = inSection(242);
1782 pattern = /(\w)?(abc)\1b/;
1783 string = 'abcab';
1784 actualmatch = string.match(pattern);
1785 expectedmatch = null;
1786 addThis();
1787
1788 /* ECMA doesn't support (?(
1789    status = inSection(243);
1790    pattern = /^(a)?(?(1)a|b)+$/;
1791    string = 'a';
1792    actualmatch = string.match(pattern);
1793    expectedmatch = null;
1794    addThis();
1795 */
1796
1797
1798
1799 //-----------------------------------------------------------------------------
1800 test();
1801 //-----------------------------------------------------------------------------
1802
1803
1804
1805 function addThis()
1806 {
1807   if(omitCurrentSection())
1808     return;
1809
1810   statusmessages[i] = status;
1811   patterns[i] = pattern;
1812   strings[i] = string;
1813   actualmatches[i] = actualmatch;
1814   expectedmatches[i] = expectedmatch;
1815   i++;
1816 }
1817
1818
1819 function omitCurrentSection()
1820 {
1821   try
1822   {
1823     // current section number is in global status variable
1824     var n = status.match(/(\d+)/)[1];
1825     return ((n < cnLBOUND) || (n > cnUBOUND));
1826   }
1827   catch(e)
1828   {
1829     return false;
1830   }
1831 }
1832
1833
1834 function test()
1835 {
1836   enterFunc ('test');
1837   printBugNumber(BUGNUMBER);
1838   printStatus (summary);
1839   testRegExp(statusmessages, patterns, strings, actualmatches, expectedmatches);
1840   exitFunc ('test');
1841 }