Skip to content

Commit 5cee9df

Browse files
committed
Add support for "xfail" to phpt SKIPIF sections
If SKIPIF output starts with "xfail" instead of "skip", the test will be marked as XFAIL with the following message. Example: --TEST-- Test xfailif feature --SKIPIF-- <?php if (some_cond()) die('xfail Expected to fail!'); ?> --FILE-- ...
1 parent 908ad3c commit 5cee9df

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

run-tests.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,6 +1590,11 @@ function run_test($php, $file, $env)
15901590
$info = " (warn: $m[1])";
15911591
}
15921592
}
1593+
1594+
if (!strncasecmp('xfail', ltrim($output), 5)) {
1595+
// Pretend we have an XFAIL section
1596+
$section_text['XFAIL'] = trim(substr(ltrim($output), 5));
1597+
}
15931598
}
15941599
}
15951600

0 commit comments

Comments
 (0)