IntelliLang: return stmt, anno params injection, string constants injection; HQL...
[fedora-idea.git] / RegExpSupport / testData / RETest.xml
blob8316fb769a1601f5a676aeb75bcfbbe605625809
1 <tests>
2   <simple>
3     <test>
4       <pattern>|</pattern>
5       <expected>OK</expected>
6     </test>
7     <test>
8       <pattern>(|\$.*)\.class</pattern>
9       <expected>OK</expected>
10     </test>
11     <test>
12       <pattern>abc</pattern>
13       <expected>OK</expected>
14     </test>
15     <test>
16       <pattern>multiple words of text</pattern>
17       <expected>OK</expected>
18     </test>
19     <test>
20       <pattern>ab|cd</pattern>
21       <expected>OK</expected>
22     </test>
23     <test>
24       <pattern>a*</pattern>
25       <expected>OK</expected>
26     </test>
27     <test>
28       <pattern>ab*c</pattern>
29       <expected>OK</expected>
30     </test>
31     <test>
32       <pattern>ab*bc</pattern>
33       <expected>OK</expected>
34     </test>
35     <test>
36       <pattern>ab+bc</pattern>
37       <expected>OK</expected>
38     </test>
39     <test>
40       <pattern>ab?bc</pattern>
41       <expected>OK</expected>
42     </test>
43     <test>
44       <pattern>ab?c</pattern>
45       <expected>OK</expected>
46     </test>
47     <test>
48       <pattern>a.c</pattern>
49       <expected>OK</expected>
50     </test>
51     <test>
52       <pattern>a.*c</pattern>
53       <expected>OK</expected>
54     </test>
55     <test>
56       <pattern>*a</pattern>
57       <expected>ERR</expected>
58     </test>
59     <test verify="false" info="true">
60       <pattern><![CDATA[a<weak_warning descr="Single repetition">{1}</weak_warning>]]></pattern>
61       <expected>OK</expected>
62     </test>
63     <test>
64       <pattern>a{}</pattern>
65       <expected>ERR</expected>
66     </test>
67     <test>
68       <pattern>a{</pattern>
69       <expected>ERR</expected>
70     </test>
71     <test>
72       <pattern>a}</pattern>
73       <expected>OK</expected>
74     </test>
75     <test>
76       <pattern>a{1,}</pattern>
77       <expected>OK</expected>
78     </test>
79     <test>
80       <pattern>a{1,2}</pattern>
81       <expected>OK</expected>
82     </test>
83     <test>
84       <pattern>a{1,foo}</pattern>
85       <expected>ERR</expected>
86     </test>
87     <test info="true" verify="false">
88       <pattern><![CDATA[<weak_warning descr="Redundant character escape">\;</weak_warning>]]></pattern>
89       <expected>OK</expected>
90     </test>
91   </simple>
92   <quantifiers>
93     <test>
94       <pattern>a?</pattern>
95       <expected>OK</expected>
96     </test>
97     <test>
98       <pattern>a+</pattern>
99       <expected>OK</expected>
100     </test>
101     <test>
102       <pattern>a*</pattern>
103       <expected>OK</expected>
104     </test>
105     <test>
106       <pattern>a??</pattern>
107       <expected>OK</expected>
108     </test>
109     <test>
110       <pattern>a+?</pattern>
111       <expected>OK</expected>
112     </test>
113     <test>
114       <pattern>a*?</pattern>
115       <expected>OK</expected>
116     </test>
117     <test>
118       <pattern>a?+</pattern>
119       <expected>OK</expected>
120     </test>
121     <test>
122       <pattern>a++</pattern>
123       <expected>OK</expected>
124     </test>
125     <test>
126       <pattern>a*+</pattern>
127       <expected>OK</expected>
128     </test>
129     <test>
130       <pattern>a**</pattern>
131       <expected>ERR</expected>
132     </test>
133     <test>
134       <pattern>a{2}</pattern>
135       <expected>OK</expected>
136     </test>
137     <test>
138       <pattern>a{1,2}</pattern>
139       <expected>OK</expected>
140     </test>
141     <test>
142       <pattern>a{2,1}</pattern>
143       <expected>ERR</expected>
144     </test>
145     <test verify="false" info="true">
146       <pattern><![CDATA[a<weak_warning descr="Repetition range replaceable by '?'">{0,1}</weak_warning>]]></pattern>
147       <expected>OK</expected>
148     </test>
149     <test verify="false" info="true">
150       <pattern><![CDATA[a<weak_warning descr="Repetition range replaceable by '+'">{1,}</weak_warning>]]></pattern>
151       <expected>OK</expected>
152     </test>
153     <test verify="false" info="true">
154       <pattern><![CDATA[a<weak_warning descr="Repetition range replaceable by '*'">{0,}</weak_warning>]]></pattern>
155       <expected>OK</expected>
156     </test>
157     <test verify="false" info="true">
158       <pattern><![CDATA[a<weak_warning descr="Single repetition">{1}</weak_warning>]]></pattern>
159       <expected>OK</expected>
160     </test>
161     <test verify="false" info="true">
162       <pattern><![CDATA[a<weak_warning descr="Fixed repetition range">{3,3}</weak_warning>]]></pattern>
163       <expected>OK</expected>
164     </test>
165     <test>
166       <pattern>a{</pattern>
167       <expected>ERR</expected>
168     </test>
169     <test>
170       <pattern>a}</pattern>
171       <expected>OK</expected>
172     </test>
173     <test>
174       <pattern>a{}</pattern>
175       <expected>ERR</expected>
176     </test>
177   </quantifiers>
178   <charclasses>
179     <test>
180       <pattern>a[bc]d</pattern>
181       <expected>OK</expected>
182     </test>
183     <test>
184       <pattern>a[b-d]e</pattern>
185       <expected>OK</expected>
186     </test>
187     <test>
188       <pattern>a[b-d]</pattern>
189       <expected>OK</expected>
190     </test>
191     <test>
192       <pattern>a[b-a]</pattern>
193       <expected>ERR</expected>
194     </test>
195     <test>
196       <pattern>a[-b]</pattern>
197       <expected>OK</expected>
198     </test>
199     <test>
200       <pattern>a[b-]</pattern>
201       <expected>OK</expected>
202     </test>
203     <test>
204       <pattern>[a-[b]]</pattern>
205       <expected jdk="OK">OK</expected>
206     </test>
207     <test>
208       <pattern>a[b&amp;&amp;[cd]]</pattern>
209       <expected>OK</expected>
210     </test>
211     <test>
212       <pattern>a[b-&amp;&amp;[cd]]</pattern>
213       <expected>ERR</expected>
214     </test>
215     <test>
216       <pattern>a[b&amp;&amp;-]</pattern>
217       <expected>OK</expected>
218     </test>
219     <test>
220       <pattern>a[b&amp;&amp;-b]</pattern>
221       <expected jdk="OK">OK</expected>
222     </test>
223     <test>
224       <pattern>[&amp;&amp;]</pattern>
225       <expected>ERR</expected>
226     </test>
227     <test>
228       <pattern>a[b&amp;&amp;c&amp;&amp;d]</pattern>
229       <expected>OK</expected>
230     </test>
231     <test>
232       <pattern>a[b&amp;&amp;c&amp;&amp;d-e&amp;&amp;f]</pattern>
233       <expected>OK</expected>
234     </test>
235     <test>
236       <pattern>a[a[b][c]]</pattern>
237       <expected>OK</expected>
238     </test>
239     <test>
240       <pattern>[a-[]]</pattern>
241       <expected>ERR</expected>
242     </test>
243     <test>
244       <pattern>[a-[b</pattern>
245       <expected>ERR</expected>
246     </test>
247     <test>
248       <pattern>[a[^b]]</pattern>
249       <expected>OK</expected>
250     </test>
251     <test>
252       <pattern>a[a[b[c]][d]]</pattern>
253       <expected>OK</expected>
254     </test>
255     <test>
256       <pattern>a[\t--]</pattern>
257       <expected>OK</expected>
258     </test>
259     <test>
260       <pattern>a[\t--]</pattern>
261       <expected>OK</expected>
262     </test>
263     <test>
264       <pattern>a[\t---]</pattern>
265       <expected>OK</expected>
266     </test>
267     <test>
268       <pattern>a[-]?c</pattern>
269       <expected>OK</expected>
270     </test>
271     <test>
272       <pattern>a[</pattern>
273       <expected>ERR</expected>
274     </test>
275     <test>
276       <pattern>a]</pattern>
277       <expected>OK</expected>
278     </test>
279     <test>
280       <pattern>[a-[</pattern>
281       <expected>ERR</expected>
282     </test>
283     <test>
284       <pattern>a[]]</pattern>
285       <expected>OK</expected>
286     </test>
287     <test>
288       <pattern>a[^bc]d</pattern>
289       <expected>OK</expected>
290     </test>
291     <test>
292       <pattern>a[^bc]</pattern>
293       <expected>OK</expected>
294     </test>
295     <test>
296       <pattern>a[]b</pattern>
297       <expected>ERR</expected>
298     </test>
299     <test>
300       <pattern>[abhgefdc]ij</pattern>
301       <expected>OK</expected>
302     </test>
303     <test>
304       <pattern>[a-zA-Z_][a-zA-Z0-9_]*</pattern>
305       <expected>OK</expected>
306     </test>
307     <test>
308       <pattern>([a-c]+?)c</pattern>
309       <expected>OK</expected>
310     </test>
311     <test>
312       <pattern>([ab]*?)b</pattern>
313       <expected>OK</expected>
314     </test>
315     <test>
316       <pattern>([ab]*)b</pattern>
317       <expected>OK</expected>
318     </test>
319     <test>
320       <pattern>([ab]??)b</pattern>
321       <expected>OK</expected>
322     </test>
323     <test>
324       <pattern>(c[ab]?)b</pattern>
325       <expected>OK</expected>
326     </test>
327     <test>
328       <pattern>(c[ab]??)b</pattern>
329       <expected>OK</expected>
330     </test>
331     <test>
332       <pattern>(c[ab]*?)b</pattern>
333       <expected>OK</expected>
334     </test>
335     <test>
336       <pattern>a[bcd]+dcdcde</pattern>
337       <expected>OK</expected>
338     </test>
339     <test>
340       <pattern>[k]</pattern>
341       <expected>OK</expected>
342     </test>
343     <test>
344       <pattern>a[bcd]*dcdcde</pattern>
345       <expected>OK</expected>
346     </test>
347     <test>
348       <pattern>[^ab]*</pattern>
349       <expected>OK</expected>
350     </test>
351     <test>
352       <pattern>a[.]b</pattern>
353       <expected>OK</expected>
354     </test>
355     <test>
356       <pattern>a[+*?]b</pattern>
357       <expected>OK</expected>
358     </test>
359     <test>
360       <pattern>a[\p{IsDigit}\p{IsAlpha}]b</pattern>
361       <expected>OK</expected>
362     </test>
363     <test>
364       <pattern>[\p{L}&amp;&amp;[^\p{Lu}]]</pattern>
365       <expected>OK</expected>
366     </test>
367     <test>
368       <pattern>a\p</pattern>
369       <expected>ERR</expected>
370     </test>
371     <test>
372       <pattern>a\p{}</pattern>
373       <expected>ERR</expected>
374     </test>
375     <test>
376       <pattern>a\p}</pattern>
377       <expected>ERR</expected>
378     </test>
379     <test>
380       <pattern>a\p{123}</pattern>
381       <expected>ERR</expected>
382     </test>
383     <test verify="false">
384       <pattern><![CDATA[a\p{<error descr="Character family name expected">*</error>}b]]></pattern>
385       <expected>OK</expected>
386     </test>
387     <test verify="false">
388       <pattern><![CDATA[[<warning descr="Redundant character range">\w-\w</warning>]]]></pattern>
389       <expected>OK</expected>
390     </test>
391     <test>
392       <pattern>[a-\w]</pattern>
393       <expected>ERR</expected>
394     </test>
395     <test>
396       <pattern>(?x)abc #foo \q bar
397 # foo
398 (?-xi)xyz(?i:ABC)</pattern>
399       <expected>OK</expected>
400     </test>
401   </charclasses>
403   <groups>
404     <test warning="false">
405       <pattern>()ef</pattern>
406       <expected>OK</expected>
407     </test>
408     <test warning="false">
409       <pattern>()*</pattern>
410       <expected>OK</expected>
411     </test>
412     <test verify="false">
413       <pattern><![CDATA[<warning descr="Empty group">()</warning>]]></pattern>
414       <expected>OK</expected>
415     </test>
416     <test verify="false">
417       <pattern><![CDATA[<warning descr="Empty group">(|)</warning>]]></pattern>
418       <expected>OK</expected>
419     </test>
420     <test>
421       <pattern>(*)b</pattern>
422       <expected>ERR</expected>
423     </test>
424     <test verify="false">
425       <pattern><![CDATA[<warning descr="Redundant group nesting">((a))</warning>]]></pattern>
426       <expected>OK</expected>
427     </test>
428     <test>
429       <pattern>(a)b(c)</pattern>
430       <expected>OK</expected>
431     </test>
432     <test>
433       <pattern>(a*)*</pattern>
434       <expected>OK</expected>
435     </test>
436     <test>
437       <pattern>(a*)+</pattern>
438       <expected>OK</expected>
439     </test>
440     <test>
441       <pattern>(a|)*</pattern>
442       <expected>OK</expected>
443     </test>
444     <test>
445       <pattern>(ab|cd)e</pattern>
446       <expected>OK</expected>
447     </test>
448     <test>
449       <pattern>(.*)c(.*)</pattern>
450       <expected>OK</expected>
451     </test>
452     <test>
453       <pattern>\((.*), (.*)\)</pattern>
454       <expected>OK</expected>
455     </test>
456     <test>
457       <pattern>a(bc)d</pattern>
458       <expected>OK</expected>
459     </test>
460     <test>
461       <pattern>([abc])*d</pattern>
462       <expected>OK</expected>
463     </test>
464     <test warning="false">
465       <pattern>((((((((((a)))))))))</pattern>
466       <expected>ERR</expected>
467     </test>
468     <test>
469       <pattern>([abc])*bcd</pattern>
470       <expected>OK</expected>
471     </test>
472     <test>
473       <pattern>(a|b)c*d</pattern>
474       <expected>OK</expected>
475     </test>
476     <test>
477       <pattern>a([bc]*)c*</pattern>
478       <expected>OK</expected>
479     </test>
480     <test>
481       <pattern>((a)(b)c)(d)</pattern>
482       <expected>OK</expected>
483     </test>
484     <test>
485       <pattern>(ab|a)b*c</pattern>
486       <expected>OK</expected>
487     </test>
488     <test>
489       <pattern>(ab|ab*)bc</pattern>
490       <expected>OK</expected>
491     </test>
492     <test>
493       <pattern>(a|b|c|d|e)f</pattern>
494       <expected>OK</expected>
495     </test>
496     <test>
497       <pattern>a([bc]*)(c*d)</pattern>
498       <expected>OK</expected>
499     </test>
500     <test>
501       <pattern>a([bc]+)(c*d)</pattern>
502       <expected>OK</expected>
503     </test>
504     <test>
505       <pattern>a([bc]*)(c+d)</pattern>
506       <expected>OK</expected>
507     </test>
508     <test>
509       <pattern>(a+|b)*</pattern>
510       <expected>OK</expected>
511     </test>
512     <test>
513       <pattern>(a+|b)+</pattern>
514       <expected>OK</expected>
515     </test>
516     <test>
517       <pattern>(a+|b)?</pattern>
518       <expected>OK</expected>
519     </test>
520     <test>
521       <pattern>(^*</pattern>
522       <expected>ERR</expected>
523     </test>
524     <test>
525       <pattern>)(</pattern>
526       <expected>ERR</expected>
527     </test>
528     <test>
529       <pattern>(?i:*)</pattern>
530       <expected>ERR</expected>
531     </test>
532   </groups>
533   <escapes>
534     <test>
535       <pattern>\q</pattern>
536       <expected>ERR</expected>
537     </test>
538     <test>
539       <pattern>\#</pattern>
540       <expected>OK</expected>
541     </test>
542     <test>
543       <pattern>a\</pattern>
544       <expected>ERR</expected>
545     </test>
546     <test>
547       <pattern>a\(b</pattern>
548       <expected>OK</expected>
549     </test>
550     <test>
551       <pattern>a\(*b</pattern>
552       <expected>OK</expected>
553     </test>
554     <test>
555       <pattern>a\\b</pattern>
556       <expected>OK</expected>
557     </test>
558     <test>
559       <pattern>\u004a</pattern>
560       <expected>OK</expected>
561     </test>
562     <test>
563       <pattern>\0123</pattern>
564       <expected>OK</expected>
565     </test>
566     <test>
567       <pattern>\0</pattern>
568       <expected>ERR</expected>
569     </test>
570     <test>
571       <pattern>\x4a</pattern>
572       <expected>OK</expected>
573     </test>
574     <test>
575       <pattern>[\x4a-\x4b]</pattern>
576       <expected>OK</expected>
577     </test>
578     <test verify="false">
579       <pattern><![CDATA[[<warning descr="Redundant character range">a-a</warning>]]]></pattern>
580       <expected>OK</expected>
581     </test>
582     <test>
583       <pattern>[\x4a-\x3f]</pattern>
584       <expected>ERR</expected>
585     </test>
586     <test>
587       <pattern>a\Qabc?*+.))]][]\Eb</pattern>
588       <expected>OK</expected>
589     </test>
590     <test>
591       <pattern>(a\Qabc?*+.))]][]\Eb)</pattern>
592       <expected>OK</expected>
593     </test>
594     <test>
595       <pattern>[\Qabc?*+.))]][]\E]</pattern>
596       <expected>OK</expected>
597     </test>
598     <test>
599       <pattern>a\Qabc?*+.))]][]\E)</pattern>
600       <expected>ERR</expected>
601     </test>
602   </escapes>
604   <anchors>
605     <test>
606       <pattern>^*</pattern>
607       <expected>OK</expected>
608     </test>
609     <test>
610       <pattern>$*</pattern>
611       <expected>OK</expected>
612     </test>
613     <test>
614       <pattern>^abc</pattern>
615       <expected>OK</expected>
616     </test>
617     <test>
618       <pattern>^abc$</pattern>
619       <expected>OK</expected>
620     </test>
621     <test>
622       <pattern>abc$</pattern>
623       <expected>OK</expected>
624     </test>
625     <test>
626       <pattern>^</pattern>
627       <expected>OK</expected>
628     </test>
629     <test>
630       <pattern>$</pattern>
631       <expected>OK</expected>
632     </test>
633     <test>
634       <pattern>$b</pattern>
635       <expected>OK</expected>
636     </test>
637     <test>
638       <pattern>^(ab|cd)e</pattern>
639       <expected>OK</expected>
640     </test>
641     <test>
642       <pattern>^a(bc+|b[eh])g|.h$</pattern>
643       <expected>OK</expected>
644     </test>
645   </anchors>
646   <namedchars>
647     <test>
648       <pattern>a*b\s+c</pattern>
649       <expected>OK</expected>
650     </test>
651     <test>
652       <pattern>\d+</pattern>
653       <expected>OK</expected>
654     </test>
655     <test>
656       <pattern>^\p{javaJavaIdentifierStart}+\p{javaJavaIdentifierPart}+$</pattern>
657       <expected>OK</expected>
658     </test>
659     <test>
660       <pattern>\p{IsDigit}\p{IsAlpha}</pattern>
661       <expected>OK</expected>
662     </test>
663     <test>
664       <pattern>[a-e]?d\\e</pattern>
665       <expected>OK</expected>
666     </test>
667     <test>
668       <pattern>((\w+)/)*(\w+)</pattern>
669       <expected>OK</expected>
670     </test>
671     <test>
672       <pattern>\p{Digit}+</pattern>
673       <expected>OK</expected>
674     </test>
675     <test>
676       <pattern>[:xdigit:]+</pattern>
677       <expected>OK</expected>
678     </test>
679     <test>
680       <pattern>\p{unknown}+</pattern>
681       <expected>ERR</expected>
682     </test>
683   </namedchars>
684   <backrefs>
685     <test>
686       <pattern>(ac*)c*d[ac]*\1</pattern>
687       <expected>OK</expected>
688     </test>
689     <test>
690       <pattern>(.)=\1</pattern>
691       <expected>OK</expected>
692     </test>
693     <test>
694       <pattern>([ab])=\1</pattern>
695       <expected>OK</expected>
696     </test>
697     <test>
698       <pattern>([ab]+)=\1</pattern>
699       <expected>OK</expected>
700     </test>
701     <test verify="false">
702       <pattern>([ab]+)=\2</pattern>
703       <expected>ERR</expected>
704     </test>
705     <test verify="false">
706       <pattern>([ab]+)=\3</pattern>
707       <expected>ERR</expected>
708     </test>
709     <test verify="false">
710       <pattern><![CDATA[([ab]+=<warning descr="Backreference is nested into the capturing group it refers to">\1</warning>)]]></pattern>
711       <expected>OK</expected>
712     </test>
713   </backrefs>
714   <complex>
715     <test>
716       <pattern>z(\w\s+(?:\w\s+\w)+)z</pattern>
717       <expected>OK</expected>
718     </test>
719     <test>
720       <pattern>(([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*</pattern>
721       <expected>OK</expected>
722     </test>
723     <test>
724       <pattern>((?:[hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*</pattern>
725       <expected>OK</expected>
726     </test>
727     <test>
728       <pattern>(([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*</pattern>
729       <expected>OK</expected>
730     </test>
731     <test>
732       <pattern>(?:([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*</pattern>
733       <expected>OK</expected>
734     </test>
735     <test>
736       <pattern>^(?:([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*$</pattern>
737       <expected>OK</expected>
738     </test>
739     <test>
740       <pattern>^(?:(?:[hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*$</pattern>
741       <expected>OK</expected>
742     </test>
743   </complex>
745   <incomplete>
746     <test>
747       <pattern>abc\</pattern>
748       <expected>ERR</expected>
749     </test>
750     <test>
751       <pattern>abc[\</pattern>
752       <expected>ERR</expected>
753     </test>
754     <test>
755       <pattern>abc\x</pattern>
756       <expected>ERR</expected>
757     </test>
758     <test>
759       <pattern>abc\x1</pattern>
760       <expected>ERR</expected>
761     </test>
762     <test>
763       <pattern>abc\u</pattern>
764       <expected>ERR</expected>
765     </test>
766     <test>
767       <pattern>abc\u22</pattern>
768       <expected>ERR</expected>
769     </test>
770     <test>
771       <pattern>\Qabc</pattern>
772       <expected>OK</expected>
773     </test>
774     <test>
775       <pattern>\Q</pattern>
776       <expected>OK</expected>
777     </test>
778     <test>
779       <pattern>\E</pattern>
780       <expected>ERR</expected>
781     </test>
782   </incomplete>
784   <regressions>
785     <!-- caused NPE in Annotator -->
786     <test>
787       <pattern>(</pattern>
788       <expected>ERR</expected>
789     </test>
790     <!-- broke by TokenType modifications -->
791     <test>
792       <pattern>[^^]</pattern>
793       <expected>OK</expected>
794     </test>
795     <!-- caused "Probably a bug: eating token without its type checking" errors in Diana -->
796     <test verify="false">
797       <pattern><![CDATA[a<error>)</error>b]]></pattern>
798       <expected>OK</expected>
799     </test>
800     <test verify="false">
801       <pattern><![CDATA[\s*@return(?:s)?\s*(?:(?:\{|:)?\s*(?<error>(</error>[^\s\}]+)\s*\}?\s*)?(.*)]]></pattern>
802       <expected>OK</expected>
803     </test>
804   </regressions>
806   <test>
807     <pattern>abc)</pattern>
808     <expected>ERR</expected>
809   </test>
810   <test>
811     <pattern>(abc</pattern>
812     <expected>ERR</expected>
813   </test>
814   <test>
815     <pattern>a+b+c</pattern>
816     <expected>OK</expected>
817   </test>
818   <test>
819     <pattern>a**</pattern>
820     <expected>ERR</expected>
821   </test>
822   <test>
823     <pattern>a++</pattern>
824     <expected>OK</expected>
825   </test>
826   <test>
827     <pattern>ab*</pattern>
828     <expected>OK</expected>
829   </test>
830   <test>
831     <pattern>abcd*efg</pattern>
832     <expected>OK</expected>
833   </test>
834   <test>
835     <pattern>a|b|c|d|e</pattern>
836     <expected>OK</expected>
837   </test>
838   <test>
839     <pattern>(bc+d$|ef*g.|h?i(j|k))</pattern>
840     <expected>OK</expected>
841   </test>
842   <test>
843     <pattern>a*(b*c*)</pattern>
844     <expected>OK</expected>
845   </test>
846   <test>
847     <pattern>a?b+c*</pattern>
848     <expected>OK</expected>
849   </test>
850   <test>
851     <pattern>i am a green (giant|man|martian)</pattern>
852     <expected>OK</expected>
853   </test>
854   <test>
855     <pattern>(wee|week)(knights|knight)</pattern>
856     <expected>OK</expected>
857   </test>
858   <test>
859     <pattern>(a.*b)(a.*b)</pattern>
860     <expected>OK</expected>
861   </test>
862   <test>
863     <pattern>(\s*\w+)?</pattern>
864     <expected>OK</expected>
865   </test>
866   <test>
867     <pattern>(?:a)</pattern>
868     <expected>OK</expected>
869   </test>
870   <test>
871     <pattern>(?:\w)</pattern>
872     <expected>OK</expected>
873   </test>
874   <test>
875     <pattern>(?:\w\s\w)+</pattern>
876     <expected>OK</expected>
877   </test>
878   <test>
879     <pattern>(a\w)(?:,(a\w))+</pattern>
880     <expected>OK</expected>
881   </test>
882   <test>
883     <pattern>abc.*?x+yz</pattern>
884     <expected>OK</expected>
885   </test>
886   <test>
887     <pattern>abc.+?x+yz</pattern>
888     <expected>OK</expected>
889   </test>
890   <test>
891     <pattern>a.+?(c|d)</pattern>
892     <expected>OK</expected>
893   </test>
894   <test>
895     <pattern>a.+(c|d)</pattern>
896     <expected>OK</expected>
897   </test>
898   <test>
899     <pattern>a+?b+?c+?</pattern>
900     <expected>OK</expected>
901   </test>
902   <real-life>
903     <test>
904       <pattern>x:found="(true|false)"</pattern>
905       <expected>OK</expected>
906     </test>
907     <test>
908       <pattern>(?:\s)|(?:/\*.*\*/)|(?://[^\n]*)</pattern>
909       <expected>OK</expected>
910     </test>
911     <test>
912       <pattern>((?:\p{Alpha}\:)?[0-9 a-z_A-Z\-\\./]+)</pattern>
913       <expected>OK</expected>
914     </test>
915     <test>
916       <pattern>^[\w\+\.\-]{2,}:</pattern>
917       <expected>OK</expected>
918     </test>
919     <test>
920       <pattern>#(.*)$</pattern>
921       <expected>OK</expected>
922     </test>
923     <test>
924       <pattern>^(([^:]+)://)?([^:/]+)(:([0-9]+))?(/.*)</pattern>
925       <expected>OK</expected>
926     </test>
927     <test>
928       <pattern>(([^:]+)://)?([^:/]+)(:([0-9]+))?(/.*)</pattern>
929       <expected>OK</expected>
930     </test>
931     <test>
932       <pattern>usd [+-]?[0-9]+.[0-9][0-9]</pattern>
933       <expected>OK</expected>
934     </test>
935     <test>
936       <pattern>\b(\w+)(\s+\1)+\b</pattern>
937       <expected>OK</expected>
938     </test>
939     <test>
940       <pattern>.*?(&lt;(error|warning|info)(?: descr="((?:[^"\\]|\\")*)")?(?: type="([0-9A-Z_]+)")?(?: foreground="([0-9xa-f]+)")?(?: background="([0-9xa-f]+)")?(?: effectcolor="([0-9xa-f]+)")?(?: effecttype="([A-Z]+)")?(?: fonttype="([0-9]+)")?(/)?>)(.*)</pattern>
941       <expected>OK</expected>
942     </test>
943   </real-life>
944 </tests>