From: Johannes Schlüter Date: Sun, 19 Oct 2008 18:04:35 +0000 (+0000) Subject: Add %S and %A to EXPECTF, they work like %s and %a but match empty strings, too X-Git-Tag: BEFORE_HEAD_NS_CHANGE~197 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=35db77d890fe690a8a77d0694abbca9854032860;p=php Add %S and %A to EXPECTF, they work like %s and %a but match empty strings, too --- diff --git a/run-tests.php b/run-tests.php index 423ede7cd3..7899b38d86 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1752,7 +1752,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);