From: Nikita Popov Date: Tue, 22 Nov 2016 21:43:23 +0000 (+0100) Subject: Add support for "xfail" to phpt SKIPIF sections X-Git-Tag: php-7.1.2RC1~93^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5cee9dfe9a479c15d08f66a4baca83ed4e7ed288;p=php 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-- --FILE-- ... --- diff --git a/run-tests.php b/run-tests.php index 14a252b934..40162881c5 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1590,6 +1590,11 @@ TEST $file $info = " (warn: $m[1])"; } } + + if (!strncasecmp('xfail', ltrim($output), 5)) { + // Pretend we have an XFAIL section + $section_text['XFAIL'] = trim(substr(ltrim($output), 5)); + } } }