1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
|
//========================================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2007-2008 - INRIA
//
// This file is distributed under the same license as the Scilab package.
//========================================================================================
// <-- JVM NOT MANDATORY -->
//========================================================================================
// unit tests strsubst
//========================================================================================
if strsubst('abc,abd,aa,bxe',',',';')<>'abc;abd;aa;bxe' then bugmes();quit;end
//========================================================================================
if strsubst('abc,abd,aa,bxe',',',emptystr())<>'abcabdaabxe' then bugmes();quit;end
//========================================================================================
if strsubst(',abc,abd,aa,bxe',',',emptystr())<>'abcabdaabxe' then bugmes();quit;end
//========================================================================================
if strsubst('abc',',',';')<>'abc' then bugmes();quit;end
//========================================================================================
if strsubst('SCI/demos/scicos','SCI','.') <> './demos/scicos' then bugmes();quit;end
//========================================================================================
if strsubst('SCI/demos/scicos','/',' ') <> 'SCI demos scicos' then bugmes();quit;end
//========================================================================================
if strsubst([],'/',' ') <> [] then bugmes();quit;end
//========================================================================================
if strsubst([],' ','') <> [] then bugmes();quit;end
//========================================================================================
if strsubst('',' ','') <> '' then bugmes();quit;end
//========================================================================================
if strsubst("2","3","1") <> "2" then bugmes();quit;end
//========================================================================================
if strsubst(["2","3"],"3","1") <> ['2' '1'] then bugmes();quit;end
//========================================================================================
r = strsubst(['Scilab','Mathlab';'Octlab','Rlab'],'lab','');
ref = ['Sci','Math';'Oct','R'];
if (r <> ref) then bugmes();quit;end
//========================================================================================
if strsubst('xbc','/abc/',' ','r') <> 'xbc' then bugmes();quit;end
if strsubst('axc','/abc/',' ','r') <> 'axc' then bugmes();quit;end
if strsubst('xaccy','/abc/',' ','r') <> 'xaccy' then bugmes();quit;end
if strsubst('abc','/ab*c/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/ab*bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abbc','/ab*bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abbbbc','/ab*bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abbbbc','/.{1}/',' ','r') <> ' bbbbc' then bugmes();quit;end
if strsubst('abbbbc','/.{3,4}/',' ','r') <> ' bc' then bugmes();quit;end
if strsubst('abbbbc','/ab{0,}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abbc','/ab+bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abc','/ab+bc/','^','r') <> 'abc' then bugmes();quit;end
if strsubst('abq','/ab+bc/','^','r') <> 'abq' then bugmes();quit;end
if strsubst('abbc','/ab{1,}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abbbbc','/ab+bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abbbbc','/ab{1,}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abbc','/ab{1,3}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abbbbc','/ab{3,4}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abbbbc','/ab{4,5}bc/','^','r') <> 'abbbbc' then bugmes();quit;end
if strsubst('abbc','/ab?bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/ab?bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/ab{0,1}bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('xaccy','/ab?bc/',' ','r') <> 'xaccy' then bugmes();quit;end
if strsubst('abc','/ab?c/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/ab{0,1}c/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abbc','/ab*bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/^abc$/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abcc','/^abc$/',' ','r') <> 'abcc' then bugmes();quit;end
if strsubst('aabc','/^abc&/',' ','r') <> 'aabc' then bugmes();quit;end
if strsubst('abbbbc','/ab{0,}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('aabc','/abc$/','^','r') <> 'a^' then bugmes();quit;end
if strsubst('abc','/ab+bc/','^','r') <> 'abc' then bugmes();quit;end
if strsubst('abq','/ab+bc/','^','r') <> 'abq' then bugmes();quit;end
if strsubst('abbc','/ab{1,}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abbbbc','/ab+bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abbbbc','/ab{1,}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('xy','/\By\b/','^','r') <> 'x^' then bugmes();quit;end
if strsubst('xy','/\By\b/','^','r') <> 'x^' then bugmes();quit;end
if strsubst('yz','/\by\B/','^','r') <> '^z' then bugmes();quit;end
if strsubst('e','/a|b|c|d|e/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abcdefg','/abcd*efg/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('xaccy','/abc/',' ','r') <> 'xaccy' then bugmes();quit;end
if strsubst('xabyabbbz','/ab*/',' ','r') <> 'x yabbbz' then bugmes();quit;end
if strsubst('hij','/[abhgefdc]ij/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abcde','/^(ab|cd)e/',' ','r') <> 'abcde' then bugmes();quit;end
if strsubst('abbbbc','/ab*bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abbbbc','/.{1}/',' ','r') <> ' bbbbc' then bugmes();quit;end
if strsubst('abbbbc','/.{3,4}/',' ','r') <> ' bc' then bugmes();quit;end
if strsubst('effg','/(bc+d$|ef*g.|h?i(j|k))/','^','r') <> 'effg' then bugmes();quit;end
if strsubst('aa','/((((((((((a))))))))))\10/','^','r') <> '^' then bugmes();quit;end
if strsubst('a!','/((((((((((a))))))))))\041/','^','r') <> '^' then bugmes();quit;end
if strsubst('a','/(((((((((a)))))))))/','^','r') <> '^' then bugmes();quit;end
if strsubst('multiple words, yeah','/multiple words/','^','r') <> '^, yeah' then bugmes();quit;end
if strsubst('ac','/a[-]?c/','^','r') <> '^' then bugmes();quit;end
if strsubst('a','/(a)|\1/','^','r') <> '^' then bugmes();quit;end
if strsubst('A-','/a[-b]/i','^','r') <> '^' then bugmes();quit;end
if strsubst('A-','/a[b-]/i','^','r') <> '^' then bugmes();quit;end
if strsubst('A]','/a]/i','^','r') <> '^' then bugmes();quit;end
if strsubst('abbc','/ab?bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/ab?bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/ab{0,1}bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('xaccy','/ab?bc/',' ','r') <> 'xaccy' then bugmes();quit;end
if strsubst('abc','/ab?c/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/ab{0,1}c/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abbc','/ab*bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/^abc$/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abcc','/^abc$/',' ','r') <> 'abcc' then bugmes();quit;end
if strsubst('aabc','/^abc&/',' ','r') <> 'aabc' then bugmes();quit;end
if strsubst('abbbbc','/ab{0,}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('aabc','/abc$/','^','r') <> 'a^' then bugmes();quit;end
if strsubst('abc','/ab+bc/','^','r') <> 'abc' then bugmes();quit;end
if strsubst('abq','/ab+bc/','^','r') <> 'abq' then bugmes();quit;end
if strsubst('abbc','/ab{1,}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abbbbc','/ab+bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abbbbc','/ab{1,}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('xy','/\By\b/','^','r') <> 'x^' then bugmes();quit;end
if strsubst('xy','/\By\b/','^','r') <> 'x^' then bugmes();quit;end
if strsubst('yz','/\by\B/','^','r') <> '^z' then bugmes();quit;end
if strsubst('e','/a|b|c|d|e/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abcdefg','/abcd*efg/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('xaccy','/abc/',' ','r') <> 'xaccy' then bugmes();quit;end
if strsubst('xabyabbbz','/ab*/',' ','r') <> 'x yabbbz' then bugmes();quit;end
if strsubst('hij','/[abhgefdc]ij/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abcde','/^(ab|cd)e/',' ','r') <> 'abcde' then bugmes();quit;end
if strsubst('abbbbc','/ab*bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abbbbc','/.{1}/',' ','r') <> ' bbbbc' then bugmes();quit;end
if strsubst('abbbbc','/.{3,4}/',' ','r') <> ' bc' then bugmes();quit;end
if strsubst('effg','/(bc+d$|ef*g.|h?i(j|k))/','^','r') <> 'effg' then bugmes();quit;end
if strsubst('aa','/((((((((((a))))))))))\10/','^','r') <> '^' then bugmes();quit;end
if strsubst('a!','/((((((((((a))))))))))\041/','^','r') <> '^' then bugmes();quit;end
if strsubst('a','/(((((((((a)))))))))/','^','r') <> '^' then bugmes();quit;end
if strsubst('multiple words, yeah','/multiple words/','^','r') <> '^, yeah' then bugmes();quit;end
if strsubst('ac','/a[-]?c/','^','r') <> '^' then bugmes();quit;end
if strsubst('a','/(a)|\1/','^','r') <> '^' then bugmes();quit;end
if strsubst('A-','/a[-b]/i','^','r') <> '^' then bugmes();quit;end
if strsubst('A-','/a[b-]/i','^','r') <> '^' then bugmes();quit;end
if strsubst('A]','/a]/i','^','r') <> '^' then bugmes();quit;end
if strsubst('abbc','/ab?bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/ab?bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/ab{0,1}bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('xaccy','/ab?bc/',' ','r') <> 'xaccy' then bugmes();quit;end
if strsubst('abc','/ab?c/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/ab{0,1}c/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abbc','/ab*bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abc','/^abc$/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abcc','/^abc$/',' ','r') <> 'abcc' then bugmes();quit;end
if strsubst('aabc','/^abc&/',' ','r') <> 'aabc' then bugmes();quit;end
if strsubst('abbbbc','/ab{0,}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('aabc','/abc$/','^','r') <> 'a^' then bugmes();quit;end
if strsubst('abc','/ab+bc/','^','r') <> 'abc' then bugmes();quit;end
if strsubst('abq','/ab+bc/','^','r') <> 'abq' then bugmes();quit;end
if strsubst('abbc','/ab{1,}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abbbbc','/ab+bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('abbbbc','/ab{1,}bc/','^','r') <> '^' then bugmes();quit;end
if strsubst('xy','/\By\b/','^','r') <> 'x^' then bugmes();quit;end
if strsubst('xy','/\By\b/','^','r') <> 'x^' then bugmes();quit;end
if strsubst('yz','/\by\B/','^','r') <> '^z' then bugmes();quit;end
if strsubst('e','/a|b|c|d|e/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abcdefg','/abcd*efg/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('xaccy','/abc/',' ','r') <> 'xaccy' then bugmes();quit;end
if strsubst('xabyabbbz','/ab*/',' ','r') <> 'x yabbbz' then bugmes();quit;end
if strsubst('hij','/[abhgefdc]ij/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abcde','/^(ab|cd)e/',' ','r') <> 'abcde' then bugmes();quit;end
if strsubst('abbbbc','/ab*bc/',' ','r') <> ' ' then bugmes();quit;end
if strsubst('abbbbc','/.{1}/',' ','r') <> ' bbbbc' then bugmes();quit;end
if strsubst('abbbbc','/.{3,4}/',' ','r') <> ' bc' then bugmes();quit;end
if strsubst('effg','/(bc+d$|ef*g.|h?i(j|k))/','^','r') <> 'effg' then bugmes();quit;end
if strsubst('aa','/((((((((((a))))))))))\10/','^','r') <> '^' then bugmes();quit;end
if strsubst('a!','/((((((((((a))))))))))\041/','^','r') <> '^' then bugmes();quit;end
if strsubst('a','/(((((((((a)))))))))/','^','r') <> '^' then bugmes();quit;end
if strsubst('multiple words, yeah','/multiple words/','^','r') <> '^, yeah' then bugmes();quit;end
if strsubst('ac','/a[-]?c/','^','r') <> '^' then bugmes();quit;end
if strsubst('a','/(a)|\1/','^','r') <> '^' then bugmes();quit;end
if strsubst('A-','/a[-b]/i','^','r') <> '^' then bugmes();quit;end
if strsubst('A-','/a[b-]/i','^','r') <> '^' then bugmes();quit;end
if strsubst('A]','/a]/i','^','r') <> '^' then bugmes();quit;end
if strsubst('abc','/abc/',' ','r') <> ' ' then bugmes();quit;end
//========================================================================================
if strsubst('......abef','/.*a(?!(b|cd)*e).*f/' ,' ' ,'r') <> '......abef' then bugmes();quit;end
if strsubst('fools','/(foo|fool|x.|money|parted)$/' ,' ' ,'r') <> 'fools' then bugmes();quit;end
if strsubst('fools','/(x.|foo|fool|x.|money|parted|y.)$/' ,' ' ,'r') <> 'fools' then bugmes();quit;end
if strsubst('fools','/(foo|fool|money|parted)$/' ,' ' ,'r') <> 'fools' then bugmes();quit;end
if strsubst('Oo','/^(o)(?!.*\1)/i' ,' ' ,'r') <> 'Oo' then bugmes();quit;end
if strsubst('AbCd','/ab(?i)cd/' ,' ' ,'r') <> 'AbCd' then bugmes();quit;end
if strsubst('a\nb\n','/a\Z/' ,' ' ,'r') <> 'a\nb\n' then bugmes();quit;end
if strsubst('a\nb\n','/a\z/' ,' ' ,'r') <> 'a\nb\n' then bugmes();quit;end
if strsubst('a\nb\n','/a$/' ,' ' ,'r') <> 'a\nb\n' then bugmes();quit;end
if strsubst('b\na\n','/a\z/' ,' ' ,'r') <> 'b\na\n' then bugmes();quit;end
if strsubst('a\nb\n','/a\Z/m' ,' ' ,'r') <> 'a\nb\n' then bugmes();quit;end
if strsubst('a\nb\n','/a\z/m' ,' ' ,'r') <> 'a\nb\n' then bugmes();quit;end
if strsubst('b\na\n','/a\z/m' ,' ' ,'r') <> 'b\na\n' then bugmes();quit;end
if strsubst('aa\nb\n','/aa\Z/' ,' ' ,'r') <> 'aa\nb\n' then bugmes();quit;end
if strsubst('aa\nb\n','/aa\z/' ,' ' ,'r') <> 'aa\nb\n' then bugmes();quit;end
if strsubst('aa\nb\n','/aa$/' ,' ' ,'r') <> 'aa\nb\n' then bugmes();quit;end
if strsubst('b\naa\n','/aa\z/' ,' ' ,'r') <> 'b\naa\n' then bugmes();quit;end
if strsubst('aa\nb\n','/aa\Z/m' ,' ' ,'r') <> 'aa\nb\n' then bugmes();quit;end
if strsubst('aa\nb\n','/aa\z/m' ,' ' ,'r') <> 'aa\nb\n' then bugmes();quit;end
if strsubst('b\naa\n','/aa\z/m' ,' ' ,'r') <> 'b\naa\n' then bugmes();quit;end
if strsubst('ac\nb\n','/aa\Z/' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('ac\nb\n','/aa\z/' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('ac\nb\n','/aa$/' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('b\nac\n','/aa\Z/' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac\n','/aa\z/' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac\n','/aa$/' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac' ,'/aa\Z/' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('b\nac' ,'/aa\z/' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('b\nac' ,'/aa$/' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('ac\nb\n','/aa\Z/m' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('ac\nb\n','/aa\z/m' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('ac\nb\n','/aa$/m' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('b\nac\n','/aa\Z/m' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac\n','/aa\z/m' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac\n','/aa$/m' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac' ,'/aa\Z/m' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('b\nac' ,'/aa\z/m' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('b\nac' ,'/aa$/m' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('ca\nb\n','/aa\Z/' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('ca\nb\n','/aa\z/' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('ca\nb\n','/aa$/' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('b\nca\n','/aa\Z/' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca\n','/aa\z/' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca\n','/aa$/' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca' ,'/aa\Z/' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('b\nca' ,'/aa\z/' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('b\nca' ,'/aa$/' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('ca\nb\n','/aa\Z/m' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('ca\nb\n','/aa\z/m' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('ca\nb\n','/aa$/m' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('b\nca\n','/aa\Z/m' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca\n','/aa\z/m' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca\n','/aa$/m' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca' ,'/aa\Z/m' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('b\nca' ,'/aa\z/m' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('b\nca' ,'/aa$/m' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('ab\nb\n','/ab\Z/' ,' ' ,'r') <> 'ab\nb\n' then bugmes();quit;end
if strsubst('ab\nb\n','/ab\z/' ,' ' ,'r') <> 'ab\nb\n' then bugmes();quit;end
if strsubst('ab\nb\n','/ab$/' ,' ' ,'r') <> 'ab\nb\n' then bugmes();quit;end
if strsubst('b\nab\n','/ab\z/' ,' ' ,'r') <> 'b\nab\n' then bugmes();quit;end
if strsubst('ab\nb\n','/ab\Z/m' ,' ' ,'r') <> 'ab\nb\n' then bugmes();quit;end
if strsubst('ab\nb\n','/ab\z/m' ,' ' ,'r') <> 'ab\nb\n' then bugmes();quit;end
if strsubst('b\nab\n','/ab\z/m' ,' ' ,'r') <> 'b\nab\n' then bugmes();quit;end
if strsubst('ac\nb\n','/ab\Z/' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('ac\nb\n','/ab\z/' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('ac\nb\n','/ab$/' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('b\nac\n','/ab\Z/' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac\n','/ab\z/' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac\n','/ab$/' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac' ,'/ab\Z/' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('b\nac' ,'/ab\z/' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('b\nac' ,'/ab$/' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('ac\nb\n','/ab\Z/m' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('ac\nb\n','/ab\z/m' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('ac\nb\n','/ab$/m' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('b\nac\n','/ab\Z/m' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac\n','/ab\z/m' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac\n','/ab$/m' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac' ,'/ab\Z/m' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('b\nac' ,'/ab\z/m' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('b\nac' ,'/ab$/m' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('ca\nb\n','/ab\Z/' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('ca\nb\n','/ab\z/' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('ca\nb\n','/ab$/' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('b\nca\n','/ab\Z/' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca\n','/ab\z/' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca\n','/ab$/' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca' ,'/ab\Z/' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('b\nca' ,'/ab\z/' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('b\nca' ,'/ab$/' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('ca\nb\n','/ab\Z/m' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('ca\nb\n','/ab\z/m' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('ca\nb\n','/ab$/m' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('b\nca\n','/ab\Z/m' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca\n' ,'/ab\z/m' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca\n','/ab$/m' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca' ,'/ab\Z/m' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('b\nca' ,'/ab\z/m' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('b\nca' ,'/ab$/m' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('abb\nb\n' ,'/abb\Z/' ,' ' ,'r') <> 'abb\nb\n' then bugmes();quit;end
if strsubst('abb\nb\n' ,'/abb\z/' ,' ' ,'r') <> 'abb\nb\n' then bugmes();quit;end
if strsubst('abb\nb\n' ,'/abb$/' ,' ' ,'r') <> 'abb\nb\n' then bugmes();quit;end
if strsubst('b\nabb\n' ,'/abb\z/' ,' ' ,'r') <> 'b\nabb\n' then bugmes();quit;end
if strsubst('abb\nb\n' ,'/abb\Z/m' ,' ' ,'r') <> 'abb\nb\n' then bugmes();quit;end
if strsubst('abb\nb\n' ,'/abb\z/m' ,' ' ,'r') <> 'abb\nb\n' then bugmes();quit;end
if strsubst('b\nabb\n','/abb\z/m' ,' ' ,'r') <> 'b\nabb\n' then bugmes();quit;end
if strsubst('ac\nb\n' ,'/abb\Z/' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('ac\nb\n' ,'/abb\z/' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('ac\nb\n' ,'/abb$/' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('b\nac\n' ,'/abb\Z/' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac\n' ,'/abb\z/' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac\n' ,'/abb$/' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac' ,'/abb\Z/' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('b\nac' ,'/abb\z/' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('b\nac' ,'/abb$/' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('ac\nb\n' ,'/abb\Z/m' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('ac\nb\n' ,'/abb\z/m' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('ac\nb\n' ,'/abb$/m' ,' ' ,'r') <> 'ac\nb\n' then bugmes();quit;end
if strsubst('b\nac\n' ,'/abb\Z/m' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac\n' ,'/abb\z/m' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac\n' ,'/abb$/m' ,' ' ,'r') <> 'b\nac\n' then bugmes();quit;end
if strsubst('b\nac' ,'/abb\Z/m' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('b\nac' ,'/abb\z/m' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('b\nac' ,'/abb$/m' ,' ' ,'r') <> 'b\nac' then bugmes();quit;end
if strsubst('ca\nb\n' ,'/abb\Z/' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('ca\nb\n' ,'/abb\z/' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('ca\nb\n' ,'/abb$/' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('b\nca\n' ,'/abb\Z/' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca\n' ,'/abb\z/' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca\n' ,'/abb$/' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca' ,'/abb\Z/' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('b\nca' ,'/abb\z/' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('b\nca' ,'/abb$/' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('ca\nb\n' ,'/abb\Z/m' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('ca\nb\n' ,'/abb\z/m' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('ca\nb\n' ,'/abb$/m' ,' ' ,'r') <> 'ca\nb\n' then bugmes();quit;end
if strsubst('b\nca\n' ,'/abb\Z/m' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca\n' ,'/abb\z/m' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca\n' ,'/abb$/m' ,' ' ,'r') <> 'b\nca\n' then bugmes();quit;end
if strsubst('b\nca' ,'/abb\Z/m' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('b\nca' ,'/abb\z/m' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('b\nca' ,'/abb$/m' ,' ' ,'r') <> 'b\nca' then bugmes();quit;end
if strsubst('aaab' ,'/^(?=(a+?))\1ab/' ,' ' ,'r') <> 'aaab' then bugmes();quit;end
if strsubst('aaab' ,'/^(?=(a+?))\1ab/' ,' ' ,'r') <> 'aaab' then bugmes();quit;end
if strsubst('abcd:' ,'/([\w:]+::)?(\w+)$/' ,' ' ,'r') <> 'abcd:' then bugmes();quit;end
if strsubst('abcd:' ,'/([\w:]+::)?(\w+)$/' ,' ' ,'r') <> 'abcd:' then bugmes();quit;end
if strsubst('aaab' ,'/(>a+)ab/' ,' ' ,'r') <> 'aaab' then bugmes();quit;end
//========================================================================================
v = "世界您好";
c = "您";
if strsubst(v,c,'ç')<>'世界ç好' then bugmes();quit;end
v = "азеазея";
c = "з";
if strsubst(v,c,'ç')<>'аçеаçея' then bugmes();quit;end
v = "ድቅስድቅስግ";
c = "ቅ";
if strsubst(v,c,'ç')<> 'ድçስድçስግ' then bugmes();quit;end
v = "ハロー・ワールド";
c = "ド";
if strsubst(v,c,'ç')<> 'ハロー・ワールç' then bugmes();quit;end
v = "เฮลโลเวิลด์";
c = "เ";
if strsubst(v,c,'ç')<> 'çฮลโลçวิลด์' then bugmes();quit;end
v = "حريات وحقوق";
c = "قوق";
if strsubst(v,c,'ç')<> 'حريات وحç' then bugmes();quit;end
v = "ഹലോ വേള്ഡ";
c = "ഡ";
if strsubst(v,c,'ç')<>'ഹലോ വേള്ç' then bugmes();quit;end
v = "תוכנית";
c = "י";
if strsubst(v,c,'ç')<>'תוכנçת' then bugmes();quit;end
//===============================
// Chinese
str = '世界您好';
if strsubst(str,'/^世界/','ç','r') <> 'ç您好' then bugmes();quit;end
if strsubst(str,'/世界$/','ç','r') <> str then bugmes();quit;end
if strsubst(str,'/您好$/','ç','r') <> '世界ç' then bugmes();quit;end
if strsubst(str,'/^您好/','ç','r') <> str then bugmes();quit;end
if strsubst(str,'/界您/','ç','r') <> '世ç好' then bugmes();quit;end
if strsubst(str,'/界_您/','ç','r') <> str then bugmes();quit;end
//========================================================================================
// Russian
str = 'привет мир';
if strsubst(str,'/^привет/','ç','r') <> 'ç мир' then bugmes();quit;end
if strsubst(str,'/привет$/','ç','r') <> str then bugmes();quit;end
if strsubst(str,'/мир$/','ç','r') <> 'привет ç' then bugmes();quit;end
if strsubst(str,'/^мир/','ç','r') <> str then bugmes();quit;end
if strsubst(str,'/вет\sм/','ç','r') <> 'приçир' then bugmes();quit;end
if strsubst(str,'/вет_м/','ç','r') <> 'привет мир' then bugmes();quit;end
//========================================================================================
// Cyrilic
str = 'АБВГДЄЖЅЗИІКЛМНОПҀРСТѸФХѠЦЧШЩЪЪІЬѢЮѦѨѪѬѮѰѲѴѤ';
if strsubst(str,'/^АБВГДЄЖЅЗИІКЛМНОПҀР/','ç','r') <> 'çСТѸФХѠЦЧШЩЪЪІЬѢЮѦѨѪѬѮѰѲѴѤ' then bugmes();quit;end
if strsubst(str,'/АБВГДЄЖЅЗИІКЛМНОПҀР$/','ç','r') <> str then bugmes();quit;end
if strsubst(str,'/ЧШЩЪЪІЬѢЮѦѨѪѬѮѰѲѴѤ$/','ç','r') <> 'АБВГДЄЖЅЗИІКЛМНОПҀРСТѸФХѠЦç' then bugmes();quit;end
if strsubst(str,'/^ЧШЩЪЪІЬѢЮѦѨѪѬѮѰѲѴѤ/','ç','r') <> str then bugmes();quit;end
if strsubst(str,'/ИІКЛМНОПҀРСТѸФХѠЦЧШЩЪ/','ç','r') <> 'АБВГДЄЖЅЗçЪІЬѢЮѦѨѪѬѮѰѲѴѤ' then bugmes();quit;end
if strsubst(str,'/ИІКЛМНОПҀ_РСТѸФХѠЦЧШЩЪ/','ç','r') <> str then bugmes();quit;end
//========================================================================================
// Japanese
str = '丑丞串乃之乎也云亘亙些亦亥亨亮仔伊伎伍伽佃佑伶侃侑俄侠俣俐侶倭俺倶倦倖偲僅傭儲允兎兜其冥冴冶凄凌凜凛凧凪凰凱函刹劉劫勁勃';
if strsubst(str,'/^丑丞串乃之乎也云亘亙些亦/','ç','r') <> 'ç亥亨亮仔伊伎伍伽佃佑伶侃侑俄侠俣俐侶倭俺倶倦倖偲僅傭儲允兎兜其冥冴冶凄凌凜凛凧凪凰凱函刹劉劫勁勃' then bugmes();quit;end
if strsubst(str,'/丑丞串乃之乎也云亘亙些亦$/','ç','r') <> str then bugmes();quit;end
if strsubst(str,'/凰凱函刹劉劫勁勃$/','ç','r') <> '丑丞串乃之乎也云亘亙些亦亥亨亮仔伊伎伍伽佃佑伶侃侑俄侠俣俐侶倭俺倶倦倖偲僅傭儲允兎兜其冥冴冶凄凌凜凛凧凪ç' then bugmes();quit;end
if strsubst(str,'/^凰凱函刹劉劫勁勃/','ç','r') <> str then bugmes();quit;end
if strsubst(str,'/亨亮仔伊伎伍伽佃佑伶侃/','ç','r') <> '丑丞串乃之乎也云亘亙些亦亥ç侑俄侠俣俐侶倭俺倶倦倖偲僅傭儲允兎兜其冥冴冶凄凌凜凛凧凪凰凱函刹劉劫勁勃' then bugmes();quit;end
if strsubst(str,'/亨亮仔伊_伎伍伽佃佑伶侃/','ç','r') <> str then bugmes();quit;end
//========================================================================================
// Thaï
str = 'มกระดุกกระดิก';
if strsubst(str,'/^มกระดุกกร/','ç','r')<>'çะดิก' then bugmes();quit;end
if strsubst(str,'/มกระดุกกร$/','ç','r') <> str then bugmes();quit;end
if strsubst(str,'/กกระดิก$/','ç','r')<>'มกระดุç' then bugmes();quit;end
if strsubst(str,'/^กกระดิก/','ç','r') <> str then bugmes();quit;end
if strsubst(str,'/ดุกก/','ç','r')<>'มกระçระดิก' then bugmes();quit;end
if strsubst(str,'/ดุก_ก/','ç','r') <> str then bugmes();quit;end
//========================================================================================
|