]> granicus.if.org Git - php/commitdiff
Add %S and %A to EXPECTF, they work like %s and %a but match empty strings, too
authorJohannes Schlüter <johannes@php.net>
Sun, 19 Oct 2008 18:07:04 +0000 (18:07 +0000)
committerJohannes Schlüter <johannes@php.net>
Sun, 19 Oct 2008 18:07:04 +0000 (18:07 +0000)
run-tests.php

index 9926735de6bc31c7173bf2623ec046a31eb1effa..7ca17d23b412d970b054a89d7afd0804f85dfe97 100755 (executable)
@@ -1551,7 +1551,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);