Index: src/parser/xhpast/__tests__/PHPASTParserTestCase.php =================================================================== --- src/parser/xhpast/__tests__/PHPASTParserTestCase.php +++ src/parser/xhpast/__tests__/PHPASTParserTestCase.php @@ -56,6 +56,10 @@ case 'comment': // Human readable comment providing test case information. break; + case 'rtrim': + // Allows construction of tests which rely on EOF without newlines. + $body = rtrim($body); + break; default: throw new Exception( pht( Index: src/parser/xhpast/__tests__/data/php-foreach-list.php.test =================================================================== --- /dev/null +++ src/parser/xhpast/__tests__/data/php-foreach-list.php.test @@ -0,0 +1,2 @@ +# fail-syntax, comment="Wrong, supported in PHP 5.5, see T4334." + $z; + + $data = (yield $a); + $data = (yield $b => $c); +}