* Bug #13795 fixed - grep with regexp option did not match the empty string properly
[scilab.git] / scilab / modules / string / tests / unit_tests / grep.dia.ref
1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2007-2008 - INRIA
4 //
5 //  This file is distributed under the same license as the Scilab package.
6 // =============================================================================
7 // <-- CLI SHELL MODE -->
8 lf = ascii(10);
9 //===============================
10 // unit tests grep
11 //===============================
12 txt=["find matches of a string in a vector of strings"
13 "search position of a character string in an other string"
14 "Compare Strings"];
15 //===============================
16 if grep(txt,"vide")<>[] then bugmes();quit;end
17 if grep([],"vide")<>[] then bugmes();quit;end
18 if grep("","vide")<>[] then bugmes();quit;end
19 e="";if execstr("grep(txt,e)","errcatch")==0 then bugmes();quit;end
20 //===============================
21 if grep(txt,"strings")<>1 then bugmes();quit;end
22 if or(grep(txt,["strings" "Strings"])<>[1 3]) then bugmes();quit;end
23 //===============================
24 [r,w]=grep(txt,["strings" "Strings"]);
25 if or(w<>[1 2])|or(r<>[1 3]) then bugmes();quit;end
26 //===============================
27 e=["strings" ""]; if execstr("[r,w]=grep(txt,e)","errcatch")==0 then bugmes();quit;end;
28 //===============================
29 if grep([]," ") <> [] then bugmes();quit;end
30 //===============================
31 if grep("AB",["A","B"]) <> 1 then bugmes();quit;end
32 //===============================
33 if grep("AB",["A";"B"]) <> 1 then bugmes();quit;end
34 //===============================
35 if grep(["AB","B"],["A";"B"]) <> 1 then bugmes();quit;end
36 //===============================
37 if grep(["AB","B"],["A";"B";"C"]) <> 1 then bugmes();quit;end
38 //===============================
39 fd = mopen(SCI+"/modules/string/tests/unit_tests/text.txt","r");
40 txt = mgetl( fd );
41 mclose( fd );
42 //===============================
43 if grep(txt,"scilab") <> [] then bugmes();quit;end
44 //===============================
45 ref = [ 1., 3., 5., 32., 48., 83., 110., 114., 162., 175., 177., 272., 365., 390., 402., 404., 408.];
46 if grep(txt,"Scilab") <> ref then bugmes();quit;end
47 //===============================
48 if grep("abc"                                     ,"/abc/"                                 ,"r") <>  1   then bugmes();quit;end
49 if grep("xbc"                                     ,"/abc/"                                 ,"r") <>  []  then bugmes();quit;end
50 if grep("axc"                                     ,"/abc/"                                 ,"r") <>  []  then bugmes();quit;end
51 if grep("abx"                                     ,"/abc/"                                 ,"r") <>  []  then bugmes();quit;end
52 if grep("xabcy"                                   ,"/abc/"                                 ,"r") <>  1   then bugmes();quit;end
53 if grep("ababc"                                   ,"/abc/"                                 ,"r") <>  1   then bugmes();quit;end
54 if grep("abc"                                     ,"/ab*c/"                                ,"r") <>  1   then bugmes();quit;end
55 if grep("abc"                                     ,"/ab*bc/"                               ,"r") <>  1   then bugmes();quit;end
56 if grep("abbc"                                    ,"/ab*bc/"                               ,"r") <>  1   then bugmes();quit;end
57 if grep("abbbbc"                                  ,"/ab*bc/"                               ,"r") <>  1   then bugmes();quit;end
58 if grep("abbbbc"                                  ,"/.{1}/"                                ,"r") <>  1   then bugmes();quit;end
59 if grep("abbbbc"                                  ,"/.{3,4}/"                              ,"r") <>  1   then bugmes();quit;end
60 if grep("abbbbc"                                  ,"/ab{0,}bc/"                            ,"r") <>  1   then bugmes();quit;end
61 if grep("abbc"                                    ,"/ab+bc/"                               ,"r") <>  1   then bugmes();quit;end
62 if grep("abc"                                     ,"/ab+bc/"                               ,"r") <>  []  then bugmes();quit;end
63 if grep("abq"                                     ,"/ab+bc/"                               ,"r") <>  []  then bugmes();quit;end
64 if grep("abq"                                     ,"/ab{1,}bc/"                            ,"r") <>  []  then bugmes();quit;end
65 if grep("abbbbc"                                  ,"/ab+bc/"                               ,"r") <>  1   then bugmes();quit;end
66 if grep("abbbbc"                                  ,"/ab{1,}bc/"                            ,"r") <>  1   then bugmes();quit;end
67 if grep("abbbbc"                                  ,"/ab{1,3}bc/"                           ,"r") <>  1   then bugmes();quit;end
68 if grep("abbbbc"                                  ,"/ab{3,4}bc/"                           ,"r") <>  1   then bugmes();quit;end
69 if grep("abbbbc"                                  ,"/ab{4,5}bc/"                           ,"r") <>  []  then bugmes();quit;end
70 if grep("abbc"                                    ,"/ab?bc/"                               ,"r") <>  1   then bugmes();quit;end
71 if grep("abc"                                     ,"/ab?bc/"                               ,"r") <>  1   then bugmes();quit;end
72 if grep("abc"                                     ,"/ab{0,1}bc/"                           ,"r") <>  1   then bugmes();quit;end
73 if grep("abbbbc"                                  ,"/ab?bc/"                               ,"r") <>  []  then bugmes();quit;end
74 if grep("abc"                                     ,"/ab?c/"                                ,"r") <>  1   then bugmes();quit;end
75 if grep("abc"                                     ,"/ab{0,1}c/"                            ,"r") <>  1   then bugmes();quit;end
76 if grep("abc"                                     ,"/^abc$/"                               ,"r") <>  1   then bugmes();quit;end
77 if grep("abcc"                                    ,"/^abc$/"                               ,"r") <>  []  then bugmes();quit;end
78 if grep("abcc"                                    ,"/^abc/"                                ,"r") <>  1   then bugmes();quit;end
79 if grep("aabc"                                    ,"/^abc$/"                               ,"r") <>  []  then bugmes();quit;end
80 if grep("aabc"                                    ,"/abc$/"                                ,"r") <>  1   then bugmes();quit;end
81 if grep("aabcd"                                   ,"/abc$/"                                ,"r") <>  []  then bugmes();quit;end
82 if grep("abc"                                     ,"/^/"                                   ,"r") <>  1   then bugmes();quit;end
83 if grep("abc"                                     ,"/$/"                                   ,"r") <>  1   then bugmes();quit;end
84 if grep("abc"                                     ,"/a.c/"                                 ,"r") <>  1   then bugmes();quit;end
85 if grep("axc"                                     ,"/a.c/"                                 ,"r") <>  1   then bugmes();quit;end
86 if grep("axyzc"                                   ,"/a.*c/"                                ,"r") <>  1   then bugmes();quit;end
87 if grep("axyzd"                                   ,"/a.*c/"                                ,"r") <>  []  then bugmes();quit;end
88 if grep("abc"                                     ,"/a[bc]d/"                              ,"r") <>  []  then bugmes();quit;end
89 if grep("abd"                                     ,"/a[bc]d/"                              ,"r") <>  1   then bugmes();quit;end
90 if grep("abd"                                     ,"/a[b-d]e/"                             ,"r") <>  []  then bugmes();quit;end
91 if grep("ace"                                     ,"/a[b-d]e/"                             ,"r") <>  1   then bugmes();quit;end
92 if grep("aac"                                     ,"/a[b-d]/"                              ,"r") <>  1   then bugmes();quit;end
93 if grep("a-"                                      ,"/a[-b]/"                               ,"r") <>  1   then bugmes();quit;end
94 if grep("a-"                                      ,"/a[b-]/"                               ,"r") <>  1   then bugmes();quit;end
95 if grep("a]"                                      ,"/a]/"                                  ,"r") <>  1   then bugmes();quit;end
96 if grep("a]b"                                     ,"/a[]]b/"                               ,"r") <>  1   then bugmes();quit;end
97 if grep("aed"                                     ,"/a[^bc]d/"                             ,"r") <>  1   then bugmes();quit;end
98 if grep("abd"                                     ,"/a[^bc]d/"                             ,"r") <>  []  then bugmes();quit;end
99 if grep("adc"                                     ,"/a[^-b]c/"                             ,"r") <>  1   then bugmes();quit;end
100 if grep("a-c"                                     ,"/a[^-b]c/"                             ,"r") <>  []  then bugmes();quit;end
101 if grep("a]c"                                     ,"/a[^]b]c/"                             ,"r") <>  []  then bugmes();quit;end
102 if grep("adc"                                     ,"/a[^]b]c/"                             ,"r") <>  1   then bugmes();quit;end
103 if grep("a-"                                      ,"/\ba\b/"                               ,"r") <>  1   then bugmes();quit;end
104 if grep("-a"                                      ,"/\ba\b/"                               ,"r") <>  1   then bugmes();quit;end
105 if grep("-a-"                                     ,"/\ba\b/"                               ,"r") <>  1   then bugmes();quit;end
106 if grep("xy"                                      ,"/\by\b/"                               ,"r") <>  []  then bugmes();quit;end
107 if grep("yz"                                      ,"/\by\b/"                               ,"r") <>  []  then bugmes();quit;end
108 if grep("xyz"                                     ,"/\by\b/"                               ,"r") <>  []  then bugmes();quit;end
109 if grep("a-"                                      ,"/\Ba\B/"                               ,"r") <>  []  then bugmes();quit;end
110 if grep("-a"                                      ,"/\Ba\B/"                               ,"r") <>  []  then bugmes();quit;end
111 if grep("-a-"                                     ,"/\Ba\B/"                               ,"r") <>  []  then bugmes();quit;end
112 if grep("xy"                                      ,"/\By\b/"                               ,"r") <>  1   then bugmes();quit;end
113 if grep("xy"                                      ,"/\By\b/"                               ,"r") <>  1   then bugmes();quit;end
114 if grep("yz"                                      ,"/\by\B/"                               ,"r") <>  1   then bugmes();quit;end
115 if grep("xyz"                                     ,"/\By\B/"                               ,"r") <>  1   then bugmes();quit;end
116 if grep("a"                                       ,"/\w/"                                  ,"r") <>  1   then bugmes();quit;end
117 if grep("-"                                       ,"/\w/"                                  ,"r") <>  []  then bugmes();quit;end
118 if grep("a"                                       ,"/\W/"                                  ,"r") <>  []  then bugmes();quit;end
119 if grep("-"                                       ,"/\W/"                                  ,"r") <>  1   then bugmes();quit;end
120 if grep("a b"                                     ,"/a\sb/"                                ,"r") <>  1   then bugmes();quit;end
121 if grep("a-b"                                     ,"/a\sb/"                                ,"r") <>  []  then bugmes();quit;end
122 if grep("a b"                                     ,"/a\Sb/"                                ,"r") <>  []  then bugmes();quit;end
123 if grep("a-b"                                     ,"/a\Sb/"                                ,"r") <>  1   then bugmes();quit;end
124 if grep("1"                                       ,"/\d/"                                  ,"r") <>  1   then bugmes();quit;end
125 if grep("-"                                       ,"/\d/"                                  ,"r") <>  []  then bugmes();quit;end
126 if grep("1"                                       ,"/\D/"                                  ,"r") <>  []  then bugmes();quit;end
127 if grep("-"                                       ,"/\D/"                                  ,"r") <>  1   then bugmes();quit;end
128 if grep("a"                                       ,"/[\w]/"                                ,"r") <>  1   then bugmes();quit;end
129 if grep("-"                                       ,"/[\w]/"                                ,"r") <>  []  then bugmes();quit;end
130 if grep("a"                                       ,"/[\W]/"                                ,"r") <>  []  then bugmes();quit;end
131 if grep("-"                                       ,"/[\W]/"                                ,"r") <>  1   then bugmes();quit;end
132 if grep("a b"                                     ,"/a[\s]b/"                              ,"r") <>  1   then bugmes();quit;end
133 if grep("a-b"                                     ,"/a[\s]b/"                              ,"r") <>  []  then bugmes();quit;end
134 if grep("a b"                                     ,"/a[\S]b/"                              ,"r") <>  []  then bugmes();quit;end
135 if grep("a-b"                                     ,"/a[\S]b/"                              ,"r") <>  1   then bugmes();quit;end
136 if grep("1"                                       ,"/[\d]/"                                ,"r") <>  1   then bugmes();quit;end
137 if grep("-"                                       ,"/[\d]/"                                ,"r") <>  []  then bugmes();quit;end
138 if grep("1"                                       ,"/[\D]/"                                ,"r") <>  []  then bugmes();quit;end
139 if grep("-"                                       ,"/[\D]/"                                ,"r") <>  1   then bugmes();quit;end
140 if grep("abc"                                     ,"/ab|cd/"                               ,"r") <>  1   then bugmes();quit;end
141 if grep("abcd"                                    ,"/ab|cd/"                               ,"r") <>  1   then bugmes();quit;end
142 if grep("b"                                       ,"/$b/"                                  ,"r") <>  []  then bugmes();quit;end
143 if grep("ab"                                      ,"/a\(*b/"                               ,"r") <>  1   then bugmes();quit;end
144 if grep("a((b"                                    ,"/a\(*b/"                               ,"r") <>  1   then bugmes();quit;end
145 if grep("aabbabc"                                 ,"/a+b+c/"                               ,"r") <>  1   then bugmes();quit;end
146 if grep("aabbabc"                                 ,"/a{1,}b{1,}c/"                         ,"r") <>  1   then bugmes();quit;end
147 if grep("abcabc"                                  ,"/a.+?c/"                               ,"r") <>  1   then bugmes();quit;end
148 if grep("cde"                                     ,"/[^ab]*/"                              ,"r") <>  1   then bugmes();quit;end
149 if grep(""                                        ,"/abc/"                                 ,"r") <>  []  then bugmes();quit;end
150 if grep(""                                        ,"/a+/"                                  ,"r") <>  []  then bugmes();quit;end
151 if grep("e"                                       ,"/a|b|c|d|e/"                           ,"r") <>  1   then bugmes();quit;end
152 if grep("abcdefg"                                 ,"/abcd*efg/"                            ,"r") <>  1   then bugmes();quit;end
153 if grep("xabyabbbz"                               ,"/ab*/"                                 ,"r") <>  1   then bugmes();quit;end
154 if grep("xayabbbz"                                ,"/ab*/"                                 ,"r") <>  1   then bugmes();quit;end
155 if grep("hij"                                     ,"/[abhgefdc]ij/"                        ,"r") <>  1   then bugmes();quit;end
156 if grep("abcde"                                   ,"/^(ab|cd)e/"                           ,"r") <>  []  then bugmes();quit;end
157 if grep("adcdcde"                                 ,"/a[bcd]*dcdcde/"                       ,"r") <>  1   then bugmes();quit;end
158 if grep("adcdcde"                                 ,"/a[bcd]+dcdcde/"                       ,"r") <>  []  then bugmes();quit;end
159 if grep("alpha"                                   ,"/[a-zA-Z_][a-zA-Z0-9_]*/"              ,"r") <>  1   then bugmes();quit;end
160 if grep("effg"                                    ,"/(bc+d$|ef*g.|h?i(j|k))/"              ,"r") <>  []  then bugmes();quit;end
161 if grep("bcdd"                                    ,"/(bc+d$|ef*g.|h?i(j|k))/"              ,"r") <>  []  then bugmes();quit;end
162 if grep("aa"                                      ,"/((((((((((a))))))))))\10/"            ,"r") <>  1   then bugmes();quit;end
163 if grep("aa"                                      ,"/((((((((((a))))))))))\041/"           ,"r") <>  []  then bugmes();quit;end
164 if grep("a!"                                      ,"/((((((((((a))))))))))\041/"           ,"r") <>  1   then bugmes();quit;end
165 if grep("a"                                       ,"/(((((((((a)))))))))/"                 ,"r") <>  1   then bugmes();quit;end
166 if grep("uh-uh"                                   ,"/multiple words of text/"              ,"r") <>  []  then bugmes();quit;end
167 if grep("multiple words, yeah"                    ,"/multiple words/"                      ,"r") <>  1   then bugmes();quit;end
168 if grep("ab"                                      ,"/[k]/"                                 ,"r") <>  []  then bugmes();quit;end
169 if grep("ac"                                      ,"/a[-]?c/"                              ,"r") <>  1   then bugmes();quit;end
170 if grep("a"                                       ,"/(a)|\1/"                              ,"r") <>  1   then bugmes();quit;end
171 if grep("x"                                       ,"/(a)|\1/"                              ,"r") <>  []  then bugmes();quit;end
172 if grep("aaxabxbaxbbx"                            ,"/((\3|b)\2(a)x)+/"                     ,"r") <>  []  then bugmes();quit;end
173 if grep("ABC"                                     ,"/abc/i"                                ,"r") <>  1   then bugmes();quit;end
174 if grep("XBC"                                     ,"/abc/i"                                ,"r") <>  []  then bugmes();quit;end
175 if grep("AXC"                                     ,"/abc/i"                                ,"r") <>  []  then bugmes();quit;end
176 if grep("ABX"                                     ,"/abc/i"                                ,"r") <>  []  then bugmes();quit;end
177 if grep("XABCY"                                   ,"/abc/i"                                ,"r") <>  1   then bugmes();quit;end
178 if grep("ABABC"                                   ,"/abc/i"                                ,"r") <>  1   then bugmes();quit;end
179 if grep("ABC"                                     ,"/ab*c/i"                               ,"r") <>  1   then bugmes();quit;end
180 if grep("ABC"                                     ,"/ab*bc/i"                              ,"r") <>  1   then bugmes();quit;end
181 if grep("ABBC"                                    ,"/ab*bc/i"                              ,"r") <>  1   then bugmes();quit;end
182 if grep("ABBBBC"                                  ,"/ab*?bc/i"                             ,"r") <>  1   then bugmes();quit;end
183 if grep("ABBBBC"                                  ,"/ab{0,}?bc/i"                          ,"r") <>  1   then bugmes();quit;end
184 if grep("ABBC"                                    ,"/ab+?bc/i"                             ,"r") <>  1   then bugmes();quit;end
185 if grep("ABC"                                     ,"/ab+bc/i"                              ,"r") <>  []  then bugmes();quit;end
186 if grep("ABQ"                                     ,"/ab+bc/i"                              ,"r") <>  []  then bugmes();quit;end
187 if grep("ABQ"                                     ,"/ab{1,}bc/i"                           ,"r") <>  []  then bugmes();quit;end
188 if grep("ABBBBC"                                  ,"/ab+bc/i"                              ,"r") <>  1   then bugmes();quit;end
189 if grep("ABBBBC"                                  ,"/ab{1,}?bc/i"                          ,"r") <>  1   then bugmes();quit;end
190 if grep("ABBBBC"                                  ,"/ab{1,3}?bc/i"                         ,"r") <>  1   then bugmes();quit;end
191 if grep("ABBBBC"                                  ,"/ab{3,4}?bc/i"                         ,"r") <>  1   then bugmes();quit;end
192 if grep("ABBBBC"                                  ,"/ab{4,5}?bc/i"                         ,"r") <>  []  then bugmes();quit;end
193 if grep("ABBC"                                    ,"/ab??bc/i"                             ,"r") <>  1   then bugmes();quit;end
194 if grep("ABC"                                     ,"/ab??bc/i"                             ,"r") <>  1   then bugmes();quit;end
195 if grep("ABC"                                     ,"/ab{0,1}?bc/i"                         ,"r") <>  1   then bugmes();quit;end
196 if grep("ABBBBC"                                  ,"/ab??bc/i"                             ,"r") <>  []  then bugmes();quit;end
197 if grep("ABC"                                     ,"/ab??c/i"                              ,"r") <>  1   then bugmes();quit;end
198 if grep("ABC"                                     ,"/ab{0,1}?c/i"                          ,"r") <>  1   then bugmes();quit;end
199 if grep("ABC"                                     ,"/^abc$/i"                              ,"r") <>  1   then bugmes();quit;end
200 if grep("ABCC"                                    ,"/^abc$/i"                              ,"r") <>  []  then bugmes();quit;end
201 if grep("ABCC"                                    ,"/^abc/i"                               ,"r") <>  1   then bugmes();quit;end
202 if grep("AABC"                                    ,"/^abc$/i"                              ,"r") <>  []  then bugmes();quit;end
203 if grep("AABC"                                    ,"/abc$/i"                               ,"r") <>  1   then bugmes();quit;end
204 if grep("ABC"                                     ,"/^/i"                                  ,"r") <>  1   then bugmes();quit;end
205 if grep("ABC"                                     ,"/$/i"                                  ,"r") <>  1   then bugmes();quit;end
206 if grep("ABC"                                     ,"/a.c/i"                                ,"r") <>  1   then bugmes();quit;end
207 if grep("AXC"                                     ,"/a.c/i"                                ,"r") <>  1   then bugmes();quit;end
208 if grep("AXYZC"                                   ,"/a.*?c/i"                              ,"r") <>  1   then bugmes();quit;end
209 if grep("AXYZD"                                   ,"/a.*c/i"                               ,"r") <>  []  then bugmes();quit;end
210 if grep("ABC"                                     ,"/a[bc]d/i"                             ,"r") <>  []  then bugmes();quit;end
211 if grep("ABD"                                     ,"/a[bc]d/i"                             ,"r") <>  1   then bugmes();quit;end
212 if grep("ABD"                                     ,"/a[b-d]e/i"                            ,"r") <>  []  then bugmes();quit;end
213 if grep("ACE"                                     ,"/a[b-d]e/i"                            ,"r") <>  1   then bugmes();quit;end
214 if grep("AAC"                                     ,"/a[b-d]/i"                             ,"r") <>  1   then bugmes();quit;end
215 if grep("A-"                                      ,"/a[-b]/i"                              ,"r") <>  1   then bugmes();quit;end
216 if grep("A-"                                      ,"/a[b-]/i"                              ,"r") <>  1   then bugmes();quit;end
217 if grep("A]"                                      ,"/a]/i"                                 ,"r") <>  1   then bugmes();quit;end
218 if grep("A]B"                                     ,"/a[]]b/i"                              ,"r") <>  1   then bugmes();quit;end
219 if grep("AED"                                     ,"/a[^bc]d/i"                            ,"r") <>  1   then bugmes();quit;end
220 if grep("ABD"                                     ,"/a[^bc]d/i"                            ,"r") <>  []  then bugmes();quit;end
221 if grep("ADC"                                     ,"/a[^-b]c/i"                            ,"r") <>  1   then bugmes();quit;end
222 if grep("A-C"                                     ,"/a[^-b]c/i"                            ,"r") <>  []  then bugmes();quit;end
223 if grep("A]C"                                     ,"/a[^]b]c/i"                            ,"r") <>  []  then bugmes();quit;end
224 if grep("ADC"                                     ,"/a[^]b]c/i"                            ,"r") <>  1   then bugmes();quit;end
225 if grep("ABC"                                     ,"/ab|cd/i"                              ,"r") <>  1   then bugmes();quit;end
226 if grep("ABCD"                                    ,"/ab|cd/i"                              ,"r") <>  1   then bugmes();quit;end
227 if grep("B"                                       ,"/$b/i"                                 ,"r") <>  []  then bugmes();quit;end
228 if grep("AB"                                      ,"/a\(*b/i"                              ,"r") <>  1   then bugmes();quit;end
229 if grep("A((B"                                    ,"/a\(*b/i"                              ,"r") <>  1   then bugmes();quit;end
230 if grep("AABBABC"                                 ,"/a+b+c/i"                              ,"r") <>  1   then bugmes();quit;end
231 if grep("AABBABC"                                 ,"/a{1,}b{1,}c/i"                        ,"r") <>  1   then bugmes();quit;end
232 if grep("ABCABC"                                  ,"/a.+?c/i"                              ,"r") <>  1   then bugmes();quit;end
233 if grep("ABCABC"                                  ,"/a.*?c/i"                              ,"r") <>  1   then bugmes();quit;end
234 if grep("ABCABC"                                  ,"/a.{0,5}?c/i"                          ,"r") <>  1   then bugmes();quit;end
235 if grep("CDE"                                     ,"/[^ab]*/i"                             ,"r") <>  1   then bugmes();quit;end
236 if grep(""                                        ,"/abc/i"                                ,"r") <>  []  then bugmes();quit;end
237 if grep(""                                        ,"/a+/i"                                 ,"r") <>  []  then bugmes();quit;end
238 if grep("E"                                       ,"/a|b|c|d|e/i"                          ,"r") <>  1   then bugmes();quit;end
239 if grep("ABCDEFG"                                 ,"/abcd*efg/i"                           ,"r") <>  1   then bugmes();quit;end
240 if grep("XABYABBBZ"                               ,"/ab*/i"                                ,"r") <>  1   then bugmes();quit;end
241 if grep("XAYABBBZ"                                ,"/ab*/i"                                ,"r") <>  1   then bugmes();quit;end
242 if grep("HIJ"                                     ,"/[abhgefdc]ij/i"                       ,"r") <>  1   then bugmes();quit;end
243 if grep("ABCDE"                                   ,"/^(ab|cd)e/i"                          ,"r") <>  []  then bugmes();quit;end
244 if grep("ADCDCDE"                                 ,"/a[bcd]*dcdcde/i"                      ,"r") <>  1   then bugmes();quit;end
245 if grep("ADCDCDE"                                 ,"/a[bcd]+dcdcde/i"                      ,"r") <>  []  then bugmes();quit;end
246 if grep("ALPHA"                                   ,"/[a-zA-Z_][a-zA-Z0-9_]*/i"             ,"r") <>  1   then bugmes();quit;end
247 if grep("EFFG"                                    ,"/(bc+d$|ef*g.|h?i(j|k))/i"             ,"r") <>  []  then bugmes();quit;end
248 if grep("BCDD"                                    ,"/(bc+d$|ef*g.|h?i(j|k))/i"             ,"r") <>  []  then bugmes();quit;end
249 if grep("AA"                                      ,"/((((((((((a))))))))))\10/i"           ,"r") <>  1   then bugmes();quit;end
250 if grep("AA"                                      ,"/((((((((((a))))))))))\041/i"          ,"r") <>  []  then bugmes();quit;end
251 if grep("A!"                                      ,"/((((((((((a))))))))))\041/i"          ,"r") <>  1   then bugmes();quit;end
252 if grep("A"                                       ,"/(((((((((a)))))))))/i"                ,"r") <>  1   then bugmes();quit;end
253 if grep("UH-UH"                                   ,"/multiple words of text/i"             ,"r") <>  []  then bugmes();quit;end
254 if grep("MULTIPLE WORDS, YEAH"                    ,"/multiple words/i"                     ,"r") <>  1   then bugmes();quit;end
255 if grep("AB"                                      ,"/[k]/i"                                ,"r") <>  []  then bugmes();quit;end
256 if grep("AC"                                      ,"/a[-]?c/i"                             ,"r") <>  1   then bugmes();quit;end
257 if grep("abad"                                    ,"/a(?!b)./"                             ,"r") <>  1   then bugmes();quit;end
258 if grep("abad"                                    ,"/a(?=d)./"                             ,"r") <>  1   then bugmes();quit;end
259 if grep("abad"                                    ,"/a(?=c|d)./"                           ,"r") <>  1   then bugmes();quit;end
260 if grep("<&OUT"                                   ,"/^[<>]&/"                              ,"r") <>  1   then bugmes();quit;end
261 if grep("aaaaaaaaa"                               ,"/^(a\1?){4}$/"                         ,"r") <>  []  then bugmes();quit;end
262 if grep("aaaaaaaaaaa"                             ,"/^(a\1?){4}$/"                         ,"r") <>  []  then bugmes();quit;end
263 if grep("aaaaaaaaa"                               ,"/^(a(?(1)\1)){4}$/"                    ,"r") <>  []  then bugmes();quit;end
264 if grep("aaaaaaaaaaa"                             ,"/^(a(?(1)\1)){4}$/"                    ,"r") <>  []  then bugmes();quit;end
265 if grep("ab"                                      ,"/(?<=a)b/"                             ,"r") <>  1   then bugmes();quit;end
266 if grep("cb"                                      ,"/(?<=a)b/"                             ,"r") <>  []  then bugmes();quit;end
267 if grep("b"                                       ,"/(?<=a)b/"                             ,"r") <>  []  then bugmes();quit;end
268 if grep("ab"                                      ,"/(?<!c)b/"                             ,"r") <>  1   then bugmes();quit;end
269 if grep("cb"                                      ,"/(?<!c)b/"                             ,"r") <>  []  then bugmes();quit;end
270 if grep("b"                                       ,"/(?<!c)b/"                             ,"r") <>  1   then bugmes();quit;end
271 if grep("b"                                       ,"/(?<!c)b/"                             ,"r") <>  1   then bugmes();quit;end
272 if grep("aba"                                     ,"/(?:..)*a/"                            ,"r") <>  1   then bugmes();quit;end
273 if grep("aba"                                     ,"/(?:..)*?a/"                           ,"r") <>  1   then bugmes();quit;end
274 if grep("abc"                                     ,"/^(?:b|a(?=(.)))*\1/"                  ,"r") <>  1   then bugmes();quit;end
275 if grep("ab"                                      ,"/(?:(?i)a)b/"                          ,"r") <>  1   then bugmes();quit;end
276 if grep("Ab"                                      ,"/(?:(?i)a)b/"                          ,"r") <>  1   then bugmes();quit;end
277 if grep("aB"                                      ,"/(?:(?i)a)b/"                          ,"r") <>  []  then bugmes();quit;end
278 if grep("aB"                                      ,"/((?i)a)b/"                            ,"r") <>  []  then bugmes();quit;end
279 if grep("ab"                                      ,"/(?i:a)b/"                             ,"r") <>  1   then bugmes();quit;end
280 if grep("Ab"                                      ,"/(?i:a)b/"                             ,"r") <>  1   then bugmes();quit;end
281 if grep("aB"                                      ,"/(?i:a)b/"                             ,"r") <>  []  then bugmes();quit;end
282 if grep("aB"                                      ,"/((?i:a))b/"                           ,"r") <>  []  then bugmes();quit;end
283 if grep("ab"                                      ,"/(?:(?-i)a)b/i"                        ,"r") <>  1   then bugmes();quit;end
284 if grep("aB"                                      ,"/(?:(?-i)a)b/i"                        ,"r") <>  1   then bugmes();quit;end
285 if grep("Ab"                                      ,"/(?:(?-i)a)b/i"                        ,"r") <>  []  then bugmes();quit;end
286 if grep("Ab"                                      ,"/((?-i)a)b/i"                          ,"r") <>  []  then bugmes();quit;end
287 if grep("aB"                                      ,"/(?:(?-i)a)b/i"                        ,"r") <>  1   then bugmes();quit;end
288 if grep("AB"                                      ,"/(?:(?-i)a)b/i"                        ,"r") <>  []  then bugmes();quit;end
289 if grep("AB"                                      ,"/((?-i)a)b/i"                          ,"r") <>  []  then bugmes();quit;end
290 if grep("ab"                                      ,"/(?-i:a)b/i"                           ,"r") <>  1   then bugmes();quit;end
291 if grep("aB"                                      ,"/(?-i:a)b/i"                           ,"r") <>  1   then bugmes();quit;end
292 if grep("Ab"                                      ,"/(?-i:a)b/i"                           ,"r") <>  []  then bugmes();quit;end
293 if grep("Ab"                                      ,"/((?-i:a))b/i"                         ,"r") <>  []  then bugmes();quit;end
294 if grep("aB"                                      ,"/(?-i:a)b/i"                           ,"r") <>  1   then bugmes();quit;end
295 if grep("AB"                                      ,"/(?-i:a)b/i"                           ,"r") <>  []  then bugmes();quit;end
296 if grep("AB"                                      ,"/((?-i:a))b/i"                         ,"r") <>  []  then bugmes();quit;end
297 if grep("a"+lf+"B"                                ,"/((?-i:a.))b/i"                        ,"r") <>  []  then bugmes();quit;end
298 if grep("B"+lf+"B"                                ,"/((?s-i:a.))b/i"                       ,"r") <>  []  then bugmes();quit;end
299 if grep("cabbbb"                                  ,"/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/","r") <>  1   then bugmes();quit;end
300 if grep("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/","r") <>  1   then bugmes();quit;end
301 if grep("foobar1234baz"                           ,"/foo\w*\d{4}baz/"                      ,"r") <>  1   then bugmes();quit;end
302 if grep("x~~"                                     ,"/x(~~)*(?:(?:F)?)?/"                   ,"r") <>  1   then bugmes();quit;end
303 if grep("aaac"                                    ,"/^a(?#xxx){3}c/"                       ,"r") <>  1   then bugmes();quit;end
304 if grep("aaac"                                    ,"/^a (?#xxx) (?#yyy) {3}c/x"            ,"r") <>  1   then bugmes();quit;end
305 if grep("dbcb"                                    ,"/(?<![cd])b/"                          ,"r") <>  []  then bugmes();quit;end
306 if grep("dbaacb"                                  ,"/(?<![cd])[ab]/"                       ,"r") <>  1   then bugmes();quit;end
307 if grep("dbcb"                                    ,"/(?<!(c|d))b/"                         ,"r") <>  []  then bugmes();quit;end
308 if grep("dbaacb"                                  ,"/(?<!(c|d))[ab]/"                      ,"r") <>  1   then bugmes();quit;end
309 if grep("cdaccb"                                  ,"/(?<!cd)[ab]/"                         ,"r") <>  1   then bugmes();quit;end
310 if grep("a--"                                     ,"/^(?:a?b?)*$/"                         ,"r") <>  []  then bugmes();quit;end
311 if grep("a"+lf+"b"+lf                             ,"/(?m)^b/"                              ,"r") <>  1   then bugmes();quit;end
312 if grep("a"+lf+"b"+lf+"c"+lf                      ,"/^b/"                                  ,"r") <>  []  then bugmes();quit;end
313 if grep("a"+lf+"b"+lf+"c"+lf                      ,"/()^b/"                                ,"r") <>  []  then bugmes();quit;end
314 if grep("a"                                       ,"/(x)?(?(1)a|b)/"                       ,"r") <>  []  then bugmes();quit;end
315 if grep("a"                                       ,"/(x)?(?(1)b|a)/"                       ,"r") <>  1   then bugmes();quit;end
316 if grep("a"                                       ,"/()?(?(1)b|a)/"                        ,"r") <>  1   then bugmes();quit;end
317 if grep("a"                                       ,"/()(?(1)b|a)/"                         ,"r") <>  []  then bugmes();quit;end
318 if grep("a"                                       ,"/()?(?(1)a|b)/"                        ,"r") <>  1   then bugmes();quit;end
319 if grep("blah)"                                   ,"/^(\()?blah(?(1)(\)))$/"               ,"r") <>  []  then bugmes();quit;end
320 if grep("(blah"                                   ,"/^(\()?blah(?(1)(\)))$/"               ,"r") <>  []  then bugmes();quit;end
321 if grep("blah)"                                   ,"/^(\(+)?blah(?(1)(\)))$/"              ,"r") <>  []  then bugmes();quit;end
322 if grep("(blah"                                   ,"/^(\(+)?blah(?(1)(\)))$/"              ,"r") <>  []  then bugmes();quit;end
323 if grep("a"                                       ,"/(?(?!a)a|b)/"                         ,"r") <>  []  then bugmes();quit;end
324 if grep("a"                                       ,"/(?(?!a)b|a)/"                         ,"r") <>  1   then bugmes();quit;end
325 if grep("a"                                       ,"/(?(?=a)b|a)/"                         ,"r") <>  []  then bugmes();quit;end
326 if grep("a"                                       ,"/(?(?=a)a|b)/"                         ,"r") <>  1   then bugmes();quit;end
327 if grep("aaab"                                    ,"/^(?=(a+?))\1ab/"                      ,"r") <>  []  then bugmes();quit;end
328 if grep("aaab"                                    ,"/^(?=(a+?))\1ab/"                      ,"r") <>  []  then bugmes();quit;end
329 if grep("abcd:"                                   ,"/([\w:]+::)?(\w+)$/"                   ,"r") <>  []  then bugmes();quit;end
330 if grep("abcd:"                                   ,"/([\w:]+::)?(\w+)$/"                   ,"r") <>  []  then bugmes();quit;end
331 if grep("aaab"                                    ,"/(>a+)ab/"                             ,"r") <>  []  then bugmes();quit;end
332 if grep("aaab"                                    ,"/(?>a+)b/"                             ,"r") <>  1   then bugmes();quit;end
333 if grep("abc"                                     ,"/[a[:]b[:c]/"                          ,"r") <>  1   then bugmes();quit;end
334 if grep("abc"                                     ,"/[a[:]b[:c]/"                          ,"r") <>  1   then bugmes();quit;end
335 if grep("((abc(ade)ufh()()x"                      ,"/((?>[^()]+)|\([^()]*\))+/"            ,"r") <>  1   then bugmes();quit;end
336 if grep("a"+lf+"b"+lf                             ,"/a\Z/"                                 ,"r") <>  []  then bugmes();quit;end
337 if grep("a"+lf+"b"+lf                             ,"/a\z/"                                 ,"r") <>  []  then bugmes();quit;end
338 if grep("a"+lf+"b"+lf                             ,"/a$/"                                  ,"r") <>  []  then bugmes();quit;end
339 if grep("b"+lf+"a"+lf                             ,"/a\z/"                                 ,"r") <>  []  then bugmes();quit;end
340 if grep("a"+lf+"b"+lf                             ,"/a\Z/m"                                ,"r") <>  []  then bugmes();quit;end
341 if grep("a"+lf+"b"+lf                             ,"/a\z/m"                                ,"r") <>  []  then bugmes();quit;end
342 if grep("b"+lf+"a"+lf                             ,"/a\z/m"                                ,"r") <>  []  then bugmes();quit;end
343 if grep("aa"+lf+"b"+lf                            ,"/aa\Z/"                                ,"r") <>  []  then bugmes();quit;end
344 if grep("aa"+lf+"b"+lf                            ,"/aa\z/"                                ,"r") <>  []  then bugmes();quit;end
345 if grep("aa"+lf+"b"+lf                            ,"/aa$/"                                 ,"r") <>  []  then bugmes();quit;end
346 if grep("b"+lf+"aa"+lf                            ,"/aa\z/"                                ,"r") <>  []  then bugmes();quit;end
347 if grep("aa"+lf+"b"+lf                            ,"/aa\Z/m"                               ,"r") <>  []  then bugmes();quit;end
348 if grep("aa"+lf+"b"+lf                            ,"/aa\z/m"                               ,"r") <>  []  then bugmes();quit;end
349 if grep("b"+lf+"aa"+lf                            ,"/aa\z/m"                               ,"r") <>  []  then bugmes();quit;end
350 if grep("ac"+lf+"b"+lf                            ,"/aa\Z/"                                ,"r") <>  []  then bugmes();quit;end
351 if grep("ac"+lf+"b"+lf                            ,"/aa\z/"                                ,"r") <>  []  then bugmes();quit;end
352 if grep("ac"+lf+"b"+lf                            ,"/aa$/"                                 ,"r") <>  []  then bugmes();quit;end
353 if grep("b"+lf+"ac"+lf                            ,"/aa\Z/"                                ,"r") <>  []  then bugmes();quit;end
354 if grep("b"+lf+"ac"+lf                            ,"/aa\z/"                                ,"r") <>  []  then bugmes();quit;end
355 if grep("b"+lf+"ac"+lf                            ,"/aa$/"                                 ,"r") <>  []  then bugmes();quit;end
356 if grep("b"+lf+"ac"                               ,"/aa\Z/"                                ,"r") <>  []  then bugmes();quit;end
357 if grep("b"+lf+"ac"                               ,"/aa\z/"                                ,"r") <>  []  then bugmes();quit;end
358 if grep("b"+lf+"ac"                               ,"/aa$/"                                 ,"r") <>  []  then bugmes();quit;end
359 if grep("ac"+lf+"b"+lf                            ,"/aa\Z/m"                               ,"r") <>  []  then bugmes();quit;end
360 if grep("ac"+lf+"b"+lf                            ,"/aa\z/m"                               ,"r") <>  []  then bugmes();quit;end
361 if grep("ac"+lf+"b"+lf                            ,"/aa$/m"                                ,"r") <>  []  then bugmes();quit;end
362 if grep("b"+lf+"ac"+lf                            ,"/aa\Z/m"                               ,"r") <>  []  then bugmes();quit;end
363 if grep("b"+lf+"ac"+lf                            ,"/aa\z/m"                               ,"r") <>  []  then bugmes();quit;end
364 if grep("b"+lf+"ac"+lf                            ,"/aa$/m"                                ,"r") <>  []  then bugmes();quit;end
365 if grep("b"+lf+"ac"                               ,"/aa\Z/m"                               ,"r") <>  []  then bugmes();quit;end
366 if grep("b"+lf+"ac"                               ,"/aa\z/m"                               ,"r") <>  []  then bugmes();quit;end
367 if grep("b"+lf+"ac"                               ,"/aa$/m"                                ,"r") <>  []  then bugmes();quit;end
368 if grep("ca"+lf+"b"+lf                            ,"/aa\Z/"                                ,"r") <>  []  then bugmes();quit;end
369 if grep("ca"+lf+"b"+lf                            ,"/aa\z/"                                ,"r") <>  []  then bugmes();quit;end
370 if grep("ca"+lf+"b"+lf                            ,"/aa$/"                                 ,"r") <>  []  then bugmes();quit;end
371 if grep("b"+lf+"ca"+lf                            ,"/aa\Z/"                                ,"r") <>  []  then bugmes();quit;end
372 if grep("b"+lf+"ca"+lf                            ,"/aa\z/"                                ,"r") <>  []  then bugmes();quit;end
373 if grep("b"+lf+"ca"+lf                            ,"/aa$/"                                 ,"r") <>  []  then bugmes();quit;end
374 if grep("b"+lf+"ca"                               ,"/aa\Z/"                                ,"r") <>  []  then bugmes();quit;end
375 if grep("b"+lf+"ca"                               ,"/aa\z/"                                ,"r") <>  []  then bugmes();quit;end
376 if grep("b"+lf+"ca"                               ,"/aa$/"                                 ,"r") <>  []  then bugmes();quit;end
377 if grep("ca"+lf+"b"+lf                            ,"/aa\Z/m"                               ,"r") <>  []  then bugmes();quit;end
378 if grep("ca"+lf+"b"+lf                            ,"/aa\z/m"                               ,"r") <>  []  then bugmes();quit;end
379 if grep("ca"+lf+"b"+lf                            ,"/aa$/m"                                ,"r") <>  []  then bugmes();quit;end
380 if grep("b"+lf+"ca"+lf                            ,"/aa\Z/m"                               ,"r") <>  []  then bugmes();quit;end
381 if grep("b"+lf+"ca"+lf                            ,"/aa\z/m"                               ,"r") <>  []  then bugmes();quit;end
382 if grep("b"+lf+"ca"+lf                            ,"/aa$/m"                                ,"r") <>  []  then bugmes();quit;end
383 if grep("b"+lf+"ca"                               ,"/aa\Z/m"                               ,"r") <>  []  then bugmes();quit;end
384 if grep("b"+lf+"ca"                               ,"/aa\z/m"                               ,"r") <>  []  then bugmes();quit;end
385 if grep("b"+lf+"ca"                               ,"/aa$/m"                                ,"r") <>  []  then bugmes();quit;end
386 if grep("ab"+lf+"b"+lf                            ,"/ab\Z/"                                ,"r") <>  []  then bugmes();quit;end
387 if grep("ab"+lf+"b"+lf                            ,"/ab\z/"                                ,"r") <>  []  then bugmes();quit;end
388 if grep("ab"+lf+"b"+lf                            ,"/ab$/"                                 ,"r") <>  []  then bugmes();quit;end
389 if grep("b"+lf+"ab"+lf                            ,"/ab\z/"                                ,"r") <>  []  then bugmes();quit;end
390 if grep("ab"+lf+"b"+lf                            ,"/ab\Z/m"                               ,"r") <>  []  then bugmes();quit;end
391 if grep("ab"+lf+"b"+lf                            ,"/ab\z/m"                               ,"r") <>  []  then bugmes();quit;end
392 if grep("b"+lf+"ab"+lf                            ,"/ab\z/m"                               ,"r") <>  []  then bugmes();quit;end
393 if grep("ac"+lf+"b"+lf                            ,"/ab\Z/"                                ,"r") <>  []  then bugmes();quit;end
394 if grep("ac"+lf+"b"+lf                            ,"/ab\z/"                                ,"r") <>  []  then bugmes();quit;end
395 if grep("ac"+lf+"b"+lf                            ,"/ab$/"                                 ,"r") <>  []  then bugmes();quit;end
396 if grep("b"+lf+"ac"+lf                            ,"/ab\Z/"                                ,"r") <>  []  then bugmes();quit;end
397 if grep("b"+lf+"ac"+lf                            ,"/ab\z/"                                ,"r") <>  []  then bugmes();quit;end
398 if grep("b"+lf+"ac"+lf                            ,"/ab$/"                                 ,"r") <>  []  then bugmes();quit;end
399 if grep("b"+lf+"ac"                               ,"/ab\Z/"                                ,"r") <>  []  then bugmes();quit;end
400 if grep("b"+lf+"ac"                               ,"/ab\z/"                                ,"r") <>  []  then bugmes();quit;end
401 if grep("b"+lf+"ac"                               ,"/ab$/"                                 ,"r") <>  []  then bugmes();quit;end
402 if grep("ac"+lf+"b"+lf                            ,"/ab\Z/m"                               ,"r") <>  []  then bugmes();quit;end
403 if grep("ac"+lf+"b"+lf                            ,"/ab\z/m"                               ,"r") <>  []  then bugmes();quit;end
404 if grep("ac"+lf+"b"+lf                            ,"/ab$/m"                                ,"r") <>  []  then bugmes();quit;end
405 if grep("b"+lf+"ac"+lf                            ,"/ab\Z/m"                               ,"r") <>  []  then bugmes();quit;end
406 if grep("b"+lf+"ac"+lf                            ,"/ab\z/m"                               ,"r") <>  []  then bugmes();quit;end
407 if grep("b"+lf+"ac"+lf                            ,"/ab$/m"                                ,"r") <>  []  then bugmes();quit;end
408 if grep("b"+lf+"ac"                               ,"/ab\Z/m"                               ,"r") <>  []  then bugmes();quit;end
409 if grep("b"+lf+"ac"                               ,"/ab\z/m"                               ,"r") <>  []  then bugmes();quit;end
410 if grep("b"+lf+"ac"                               ,"/ab$/m"                                ,"r") <>  []  then bugmes();quit;end
411 if grep("ca"+lf+"b"+lf                            ,"/ab\Z/"                                ,"r") <>  []  then bugmes();quit;end
412 if grep("ca"+lf+"b"+lf                            ,"/ab\z/"                                ,"r") <>  []  then bugmes();quit;end
413 if grep("ca"+lf+"b"+lf                            ,"/ab$/"                                 ,"r") <>  []  then bugmes();quit;end
414 if grep("b"+lf+"ca"+lf                            ,"/ab\Z/"                                ,"r") <>  []  then bugmes();quit;end
415 if grep("b"+lf+"ca"+lf                            ,"/ab\z/"                                ,"r") <>  []  then bugmes();quit;end
416 if grep("b"+lf+"ca"+lf                            ,"/ab$/"                                 ,"r") <>  []  then bugmes();quit;end
417 if grep("b"+lf+"ca"                               ,"/ab\Z/"                                ,"r") <>  []  then bugmes();quit;end
418 if grep("b"+lf+"ca"                               ,"/ab\z/"                                ,"r") <>  []  then bugmes();quit;end
419 if grep("b"+lf+"ca"                               ,"/ab$/"                                 ,"r") <>  []  then bugmes();quit;end
420 if grep("ca"+lf+"b"+lf                            ,"/ab\Z/m"                               ,"r") <>  []  then bugmes();quit;end
421 if grep("ca"+lf+"b"+lf                            ,"/ab\z/m"                               ,"r") <>  []  then bugmes();quit;end
422 if grep("ca"+lf+"b"+lf                            ,"/ab$/m"                                ,"r") <>  []  then bugmes();quit;end
423 if grep("b"+lf+"ca"+lf                            ,"/ab\Z/m"                               ,"r") <>  []  then bugmes();quit;end
424 if grep("b"+lf+"ca"+lf                            ,"/ab\z/m"                               ,"r") <>  []  then bugmes();quit;end
425 if grep("b"+lf+"ca"+lf                            ,"/ab$/m"                                ,"r") <>  []  then bugmes();quit;end
426 if grep("b"+lf+"ca"                               ,"/ab\Z/m"                               ,"r") <>  []  then bugmes();quit;end
427 if grep("b"+lf+"ca"                               ,"/ab\z/m"                               ,"r") <>  []  then bugmes();quit;end
428 if grep("b"+lf+"ca"                               ,"/ab$/m"                                ,"r") <>  []  then bugmes();quit;end
429 if grep("abb"+lf+"b"+lf                           ,"/abb\Z/"                               ,"r") <>  []  then bugmes();quit;end
430 if grep("abb"+lf+"b"+lf                           ,"/abb\z/"                               ,"r") <>  []  then bugmes();quit;end
431 if grep("abb"+lf+"b"+lf                           ,"/abb$/"                                ,"r") <>  []  then bugmes();quit;end
432 if grep("b"+lf+"abb"+lf                           ,"/abb\z/"                               ,"r") <>  []  then bugmes();quit;end
433 if grep("abb"+lf+"b"+lf                           ,"/abb\Z/m"                              ,"r") <>  []  then bugmes();quit;end
434 if grep("abb"+lf+"b"+lf                           ,"/abb\z/m"                              ,"r") <>  []  then bugmes();quit;end
435 if grep("b"+lf+"abb"+lf                           ,"/abb\z/m"                              ,"r") <>  []  then bugmes();quit;end
436 if grep("ac"+lf+"b"+lf                            ,"/abb\Z/"                               ,"r") <>  []  then bugmes();quit;end
437 if grep("ac"+lf+"b"+lf                            ,"/abb\z/"                               ,"r") <>  []  then bugmes();quit;end
438 if grep("ac"+lf+"b"+lf                            ,"/abb$/"                                ,"r") <>  []  then bugmes();quit;end
439 if grep("b"+lf+"ac"+lf                            ,"/abb\Z/"                               ,"r") <>  []  then bugmes();quit;end
440 if grep("b"+lf+"ac"+lf                            ,"/abb\z/"                               ,"r") <>  []  then bugmes();quit;end
441 if grep("b"+lf+"ac"+lf                            ,"/abb$/"                                ,"r") <>  []  then bugmes();quit;end
442 if grep("b"+lf+"ac"                               ,"/abb\Z/"                               ,"r") <>  []  then bugmes();quit;end
443 if grep("b"+lf+"ac"                               ,"/abb\z/"                               ,"r") <>  []  then bugmes();quit;end
444 if grep("b"+lf+"ac"                               ,"/abb$/"                                ,"r") <>  []  then bugmes();quit;end
445 if grep("ac"+lf+"b"+lf                            ,"/abb\Z/m"                              ,"r") <>  []  then bugmes();quit;end
446 if grep("ac"+lf+"b"+lf                            ,"/abb\z/m"                              ,"r") <>  []  then bugmes();quit;end
447 if grep("ac"+lf+"b"+lf                            ,"/abb$/m"                               ,"r") <>  []  then bugmes();quit;end
448 if grep("b"+lf+"ac"+lf                            ,"/abb\Z/m"                              ,"r") <>  []  then bugmes();quit;end
449 if grep("b"+lf+"ac"+lf                            ,"/abb\z/m"                              ,"r") <>  []  then bugmes();quit;end
450 if grep("b"+lf+"ac"+lf                            ,"/abb$/m"                               ,"r") <>  []  then bugmes();quit;end
451 if grep("b"+lf+"ac"                               ,"/abb\Z/m"                              ,"r") <>  []  then bugmes();quit;end
452 if grep("b"+lf+"ac"                               ,"/abb\z/m"                              ,"r") <>  []  then bugmes();quit;end
453 if grep("b"+lf+"ac"                               ,"/abb$/m"                               ,"r") <>  []  then bugmes();quit;end
454 if grep("ca"+lf+"b"+lf                            ,"/abb\Z/"                               ,"r") <>  []  then bugmes();quit;end
455 if grep("ca"+lf+"b"+lf                            ,"/abb\z/"                               ,"r") <>  []  then bugmes();quit;end
456 if grep("ca"+lf+"b"+lf                            ,"/abb$/"                                ,"r") <>  []  then bugmes();quit;end
457 if grep("b"+lf+"ca"+lf                            ,"/abb\Z/"                               ,"r") <>  []  then bugmes();quit;end
458 if grep("b"+lf+"ca"+lf                            ,"/abb\z/"                               ,"r") <>  []  then bugmes();quit;end
459 if grep("b"+lf+"ca"+lf                            ,"/abb$/"                                ,"r") <>  []  then bugmes();quit;end
460 if grep("b"+lf+"ca"                               ,"/abb\Z/"                               ,"r") <>  []  then bugmes();quit;end
461 if grep("b"+lf+"ca"                               ,"/abb\z/"                               ,"r") <>  []  then bugmes();quit;end
462 if grep("b"+lf+"ca"                               ,"/abb$/"                                ,"r") <>  []  then bugmes();quit;end
463 if grep("ca"+lf+"b"+lf                            ,"/abb\Z/m"                              ,"r") <>  []  then bugmes();quit;end
464 if grep("ca"+lf+"b"+lf                            ,"/abb\z/m"                              ,"r") <>  []  then bugmes();quit;end
465 if grep("ca"+lf+"b"+lf                            ,"/abb$/m"                               ,"r") <>  []  then bugmes();quit;end
466 if grep("b"+lf+"ca"+lf                            ,"/abb\Z/m"                              ,"r") <>  []  then bugmes();quit;end
467 if grep("b"+lf+"ca"+lf                            ,"/abb\z/m"                              ,"r") <>  []  then bugmes();quit;end
468 if grep("b"+lf+"ca"+lf                            ,"/abb$/m"                               ,"r") <>  []  then bugmes();quit;end
469 if grep("b"+lf+"ca"                               ,"/abb\Z/m"                              ,"r") <>  []  then bugmes();quit;end
470 if grep("b"+lf+"ca"                               ,"/abb\z/m"                              ,"r") <>  []  then bugmes();quit;end
471 if grep("b"+lf+"ca"                               ,"/abb$/m"                               ,"r") <>  []  then bugmes();quit;end
472 if grep("x"                                       ,"/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/","r") <>  []  then bugmes();quit;end
473 if grep("foo.bart"                                ,"/foo.bart/"                            ,"r") <>  1   then bugmes();quit;end
474 if grep("abcd"+lf+"dxxx"                          ,"/^d[x][x][x]/m"                        ,"r") <>  1   then bugmes();quit;end
475 if grep("xxxtt"                                   ,"/tt+$/"                                ,"r") <>  1   then bugmes();quit;end
476 if grep("aaaXbX"                                  ,"/\GX.*X/"                              ,"r") <>  []  then bugmes();quit;end
477 if grep("Changes"                                 ,"/\.c(pp|xx|c)?$/i"                     ,"r") <>  []  then bugmes();quit;end
478 if grep("IO.c"                                    ,"/\.c(pp|xx|c)?$/i"                     ,"r") <>  1   then bugmes();quit;end
479 if grep("C:/"                                     ,"/^([a-z]:)/"                           ,"r") <>  []  then bugmes();quit;end
480 if grep(lf+"x aa"                                 ,"/^\S\s+aa$/m"                          ,"r") <>  1   then bugmes();quit;end
481 if grep("ab"                                      ,"/(^|a)b/"                              ,"r") <>  1   then bugmes();quit;end
482 if grep("abcab"                                   ,"/(\w)?(abc)\1b/"                       ,"r") <>  []  then bugmes();quit;end
483 if grep("a,b,c"                                   ,"/^(?:.,){2}c/"                         ,"r") <>  1   then bugmes();quit;end
484 if grep("a,b,c"                                   ,"/^(?:[^,]*,){2}c/"                     ,"r") <>  1   then bugmes();quit;end
485 if grep(""                                        ,"/(?i)/"                                ,"r") <>  1  then bugmes();quit;end
486 if grep("a"+lf+"xb"+lf                            ,"/(?!\A)x/m"                            ,"r") <>  1   then bugmes();quit;end
487 if grep("123"+lf+"abcabcabcabc"+lf                ,"/^.{9}abc.*\n/m"                       ,"r") <>  1   then bugmes();quit;end
488 if grep("a"                                       ,"/^(a)?(?(1)a|b)+$/"                    ,"r") <>  []  then bugmes();quit;end
489 if grep("x1"                                      ,"/^(0+)?(?:x(1))?/"                     ,"r") <>  1   then bugmes();quit;end
490 if grep("012cxx0190"                              ,"/^([0-9a-fA-F]+)(?:x([0-9a-fA-F]+)?)(?:x([0-9a-fA-F]+))?/","r") <>  1   then bugmes();quit;end
491 if grep("aaaacccc"                                ,"/((?:aaaa|bbbb)cccc)?/"                ,"r") <>  1   then bugmes();quit;end
492 if grep("bbbbcccc"                                ,"/((?:aaaa|bbbb)cccc)?/"                ,"r") <>  1   then bugmes();quit;end
493 if grep("a"+lf+"b"+lf                             ,"/b\s^/m"                               ,"r") <>  []  then bugmes();quit;end
494 if grep("a"                                       ,"/\ba/"                                 ,"r") <>  1   then bugmes();quit;end
495 if grep("AbCd"                                    ,"/ab(?i)cd/"                            ,"r") <>  []  then bugmes();quit;end
496 if grep("abCd"                                    ,"/ab(?i)cd/"                            ,"r") <>  1   then bugmes();quit;end
497 if grep("Oo"                                      ,"/^(o)(?!.*\1)/i"                       ,"r") <>  []  then bugmes();quit;end
498 if grep("2"                                       ,"/2(]*)?$\1/"                           ,"r") <>  1   then bugmes();quit;end
499 if grep("......abef"                              ,"/.*a(?!(b|cd)*e).*f/"                  ,"r") <>  []  then bugmes();quit;end
500 if grep("fools"                                   ,"/(foo|fool|x.|money|parted)$/"         ,"r") <>  []  then bugmes();quit;end
501 if grep("fools"                                   ,"/(x.|foo|fool|x.|money|parted|y.)$/"   ,"r") <>  []  then bugmes();quit;end
502 if grep("fools"                                   ,"/(foo|fool|money|parted)$/"            ,"r") <>  []  then bugmes();quit;end
503 //========================================================================================
504 // depend of PCRE library options
505 //if grep('a\b'                                     ,'/a\\b/'                                ,'r') <>  1   then bugmes();quit;end
506 //if grep('bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'  ,'/.X(.+)+X/'                            ,'r') <>  1   then bugmes();quit;end
507 //if grep('bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ,'/.X(.+)+XX/'                           ,'r') <>  1   then bugmes();quit;end
508 //if grep('bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ,'/.XX(.+)+X/'                           ,'r') <>  1   then bugmes();quit;end
509 //if grep('bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'  ,'/.X(.+)+X/'                            ,'r') <>  []  then bugmes();quit;end
510 //if grep('bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ,'/.X(.+)+XX/'                           ,'r') <>  []  then bugmes();quit;end
511 //if grep('bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ,'/.XX(.+)+X/'                           ,'r') <>  []  then bugmes();quit;end
512 //if grep('bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'  ,'/.X(.+)+[X]/'                          ,'r') <>  1   then bugmes();quit;end
513 //if grep('bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ,'/.X(.+)+[X][X]/'                       ,'r') <>  1   then bugmes();quit;end
514 //if grep('bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ,'/.XX(.+)+[X]/'                         ,'r') <>  1   then bugmes();quit;end
515 //if grep('bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'  ,'/.X(.+)+[X]/'                          ,'r') <>  []  then bugmes();quit;end
516 //if grep('bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ,'/.X(.+)+[X][X]/'                       ,'r') <>  []  then bugmes();quit;end
517 //if grep('bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ,'/.XX(.+)+[X]/'                         ,'r') <>  []  then bugmes();quit;end
518 //if grep('bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'  ,'/.[X](.+)+[X]/'                        ,'r') <>  1   then bugmes();quit;end
519 //if grep('bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ,'/.[X](.+)+[X][X]/'                     ,'r') <>  1   then bugmes();quit;end
520 //if grep('bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ,'/.[X][X](.+)+[X]/'                     ,'r') <>  1   then bugmes();quit;end
521 //if grep('bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'  ,'/.[X](.+)+[X]/'                        ,'r') <>  []  then bugmes();quit;end
522 //if grep('bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ,'/.[X](.+)+[X][X]/'                     ,'r') <>  []  then bugmes();quit;end
523 //if grep('bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ,'/.[X][X](.+)+[X]/'                     ,'r') <>  []  then bugmes();quit;end
524 //if grep('cabd'                                    ,'/a(?{})b/'                             ,'r') <>  1   then bugmes();quit;end
525 //if grep('a'                                       ,'/(?(?{0})b|a)/'                        ,'r') <>  1   then bugmes();quit;end
526 //if grep('a'                                       ,'/(?(?{1})a|b)/'                        ,'r') <>  1   then bugmes();quit;end
527 //if grep('x'                                       ,'/(??{})/'                              ,'r') <>  1   then bugmes();quit;end
528 //if grep('cabd'                                    ,'/a(?{"\{"})b/'                         ,'r') <>  1   then bugmes();quit;end
529 //if grep('A\B'                                     ,'/a\\b/i'                               ,'r') <>  1   then bugmes();quit;end
530 //if grep('aaaaaaaaaaaaaaab'                        ,'/(a|aa|aaa|aaaa|aaaaa|aaaaaa)(??{$1&&"foo"})(b|c)/','r') <>  []  then bugmes();quit;end
531 //========================================================================================
532 str = "世界您好";
533 needle = "界";
534 [r,w] = grep(str,needle);
535 if r <> 1 then bugmes();quit;end
536 if w <> 1 then bugmes();quit;end
537 str = "азеазея";
538 needle = "з";
539 [r,w] = grep(str,needle);
540 if r <> 1 then bugmes();quit;end
541 if w <> 1 then bugmes();quit;end
542 str = "ハロー・ワールド";
543 needle = "ワ";
544 [r,w] = grep(str,needle);
545 if r <> 1 then bugmes();quit;end
546 if w <> 1 then bugmes();quit;end
547 str = "เฮลโลเวิลด์";
548 needle = "วิ";
549 [r,w] = grep(str,needle);
550 if r <> 1 then bugmes();quit;end
551 if w <> 1 then bugmes();quit;end
552 str = "حريات وحقوق";
553 needle = "و";
554 [r,w] = grep(str,needle);
555 if r <> 1 then bugmes();quit;end
556 if w <> 1 then bugmes();quit;end
557 str = "תוכנית";
558 needle = "ו";
559 grep(str,needle);
560 if r <> 1 then bugmes();quit;end
561 if w <> 1 then bugmes();quit;end
562 //========================================================================================
563 // Chinese
564 str = "世界您好";
565 [r,w] = grep(str,"/^世界/","r");
566 if r <> 1 then bugmes();quit;end
567 if w <> 1 then bugmes();quit;end
568 [r,w] = grep(str,"/世界$/","r");
569 if r <> [] then bugmes();quit;end
570 if w <> [] then bugmes();quit;end
571 [r,w] = grep(str,"/您好$/","r");
572 if r <> 1 then bugmes();quit;end
573 if w <> 1 then bugmes();quit;end
574 [r,w] = grep(str,"/^您好/","r");
575 if r <> [] then bugmes();quit;end
576 if w <> [] then bugmes();quit;end
577 [r,w] = grep(str,"/界您/","r");
578 if r <> 1 then bugmes();quit;end
579 if w <> 1 then bugmes();quit;end
580 [r,w] = grep(str,"界您");
581 if r <> 1 then bugmes();quit;end
582 if w <> 1 then bugmes();quit;end
583 [r,w] = grep(str,"/界_您/","r");
584 if r <> [] then bugmes();quit;end
585 if w <> [] then bugmes();quit;end
586 //========================================================================================
587 // Russian
588 str = "привет мир";
589 [r,w] = grep(str,"/^привет/","r");
590 if r <> 1 then bugmes();quit;end
591 if w <> 1 then bugmes();quit;end
592 [r,w] = grep(str,"/привет$/","r");
593 if r <> [] then bugmes();quit;end
594 if w <> [] then bugmes();quit;end
595 [r,w] = grep(str,"/мир$/","r");
596 if r <> 1 then bugmes();quit;end
597 if w <> 1 then bugmes();quit;end
598 [r,w] = grep(str,"/^мир/","r");
599 if r <> [] then bugmes();quit;end
600 if w <> [] then bugmes();quit;end
601 [r,w] = grep(str,"/вет\sм/","r");
602 if r <> 1 then bugmes();quit;end
603 if w <> 1 then bugmes();quit;end
604 [r,w] = grep(str,"/вет_м/","r");
605 if r <> [] then bugmes();quit;end
606 if w <> [] then bugmes();quit;end
607 //========================================================================================
608 // Cyrilic
609 str = "АБВГДЄЖЅЗИІКЛМНОПҀРСТѸФХѠЦЧШЩЪЪІЬѢЮѦѨѪѬѮѰѲѴѤ";
610 [r,w] = grep(str,"/^АБВГДЄЖЅЗИІКЛМНОПҀР/","r");
611 if r <> 1 then bugmes();quit;end
612 if w <> 1 then bugmes();quit;end
613 [r,w] = grep(str,"/АБВГДЄЖЅЗИІКЛМНОПҀР$/","r");
614 if r <> [] then bugmes();quit;end
615 if w <> [] then bugmes();quit;end
616 [r,w] = grep(str,"/ЧШЩЪЪІЬѢЮѦѨѪѬѮѰѲѴѤ$/","r");
617 if r <> 1 then bugmes();quit;end
618 if w <> 1 then bugmes();quit;end
619 [r,w] = grep(str,"/^ЧШЩЪЪІЬѢЮѦѨѪѬѮѰѲѴѤ/","r");
620 if r <> [] then bugmes();quit;end
621 if w <> [] then bugmes();quit;end
622 [r,w] = grep(str,"/ИІКЛМНОПҀРСТѸФХѠЦЧШЩЪ/","r");
623 if r <> 1 then bugmes();quit;end
624 if w <> 1 then bugmes();quit;end
625 [r,w] = grep(str,"/ИІКЛМНОПҀ_РСТѸФХѠЦЧШЩЪ/","r");
626 if r <> [] then bugmes();quit;end
627 if w <> [] then bugmes();quit;end
628 //========================================================================================
629 // Japanese
630 str = "丑丞串乃之乎也云亘亙些亦亥亨亮仔伊伎伍伽佃佑伶侃侑俄侠俣俐侶倭俺倶倦倖偲僅傭儲允兎兜其冥冴冶凄凌凜凛凧凪凰凱函刹劉劫勁勃";
631 [r,w] = grep(str,"/^丑丞串乃之乎也云亘亙些亦/","r");
632 if r <> 1 then bugmes();quit;end
633 if w <> 1 then bugmes();quit;end
634 [r,w] = grep(str,"/丑丞串乃之乎也云亘亙些亦$/","r");
635 if r <> [] then bugmes();quit;end
636 if w <> [] then bugmes();quit;end
637 [r,w] = grep(str,"/凰凱函刹劉劫勁勃$/","r");
638 if r <> 1 then bugmes();quit;end
639 if w <> 1 then bugmes();quit;end
640 [r,w] = grep(str,"/^凰凱函刹劉劫勁勃/","r");
641 if r <> [] then bugmes();quit;end
642 if w <> [] then bugmes();quit;end
643 [r,w] = grep(str,"/亨亮仔伊伎伍伽佃佑伶侃/","r");
644 if r <> 1 then bugmes();quit;end
645 if w <> 1 then bugmes();quit;end
646 [r,w] = grep(str,"/亨亮仔伊_伎伍伽佃佑伶侃/","r");
647 if r <> [] then bugmes();quit;end
648 if w <> [] then bugmes();quit;end
649 //========================================================================================
650 // Thaï
651 str = "มกระดุกกระดิก";
652 [r,w] = grep(str,"/^มกระดุกกร/","r");
653 if r <> 1 then bugmes();quit;end
654 if w <> 1 then bugmes();quit;end
655 [r,w] = grep(str,"/มกระดุกกร$/","r");
656 if r <> [] then bugmes();quit;end
657 if w <> [] then bugmes();quit;end
658 [r,w] = grep(str,"/กกระดิก$/","r");
659 if r <> 1 then bugmes();quit;end
660 if w <> 1 then bugmes();quit;end
661 [r,w] = grep(str,"/^กกระดิก/","r");
662 if r <> [] then bugmes();quit;end
663 if w <> [] then bugmes();quit;end
664 [r,w] = grep(str,"/ดุกก/","r");
665 if r <> 1 then bugmes();quit;end
666 if w <> 1 then bugmes();quit;end
667 [r,w] = grep(str,"/ดุก_ก/","r");
668 if r <> [] then bugmes();quit;end
669 if w <> [] then bugmes();quit;end
670 //========================================================================================