]> 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:04:35 +0000 (18:04 +0000)
committerJohannes Schlüter <johannes@php.net>
Sun, 19 Oct 2008 18:04:35 +0000 (18:04 +0000)
run-tests.php

index 423ede7cd33f9f3c4c6c70e384f598cf89f5825c..7899b38d865619977677e8d7a348d447e5f9fa4f 100755 (executable)
@@ -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);