]> granicus.if.org Git - php/commitdiff
Adds a 'reason' for skipping a test.
authorMelvyn Sopacua <msopacua@php.net>
Mon, 21 Oct 2002 08:52:45 +0000 (08:52 +0000)
committerMelvyn Sopacua <msopacua@php.net>
Mon, 21 Oct 2002 08:52:45 +0000 (08:52 +0000)
# See modifications on ext/xml/tests/007.phpt for example

run-tests.php

index c668b2a8b700b8e58a8e2c8edfdbbbb3b7f596ab..ac599bc7c51329da1dbbd6396cf565ac3ecdb323 100755 (executable)
@@ -433,8 +433,11 @@ TEST $file
                        save_text($tmp_skipif, $section_text['SKIPIF']);
                        $output = `$php $tmp_skipif`;
                        @unlink($tmp_skipif);
-                       if (trim($output) == 'skip') {
+                       if (ereg("^skip", trim($output))){
                                echo "SKIP $tested\n";
+                               $reason = (ereg("^skip\s*(.+)$", trim($output))) ? ereg_replace("^skip\s*(.+)$", "\\1", trim($output)) : FALSE;
+                               if($reason)
+                                       print "\treason: $reason\n";
                                return 'SKIPPED';
                        }
                }