Browse Source

Add %S and %A to EXPECTF, they work like %s and %a but match empty strings, too

PECL
Johannes Schlüter 18 years ago
parent
commit
0c6da3760b
  1. 2
      run-tests.php

2
run-tests.php

@ -1747,7 +1747,9 @@ COMMAND $cmd
// Stick to basics
$wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re);
$wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re);
$wanted_re = str_replace('%S', '[^\r\n]*', $wanted_re);
$wanted_re = str_replace('%a', '.+', $wanted_re);
$wanted_re = str_replace('%A', '.*', $wanted_re);
$wanted_re = str_replace('%w', '\s*', $wanted_re);
$wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re);
$wanted_re = str_replace('%d', '\d+', $wanted_re);

Loading…
Cancel
Save