Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15377486
D8031.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8031.diff
View Options
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."
+<?php foreach ($x as list($y, $z)) {}
Index: src/parser/xhpast/__tests__/data/php-heredoc-terminal.php.test
===================================================================
--- /dev/null
+++ src/parser/xhpast/__tests__/data/php-heredoc-terminal.php.test
@@ -0,0 +1,4 @@
+# fail-syntax, rtrim, comment="Wrong, supported in PHP 5.5, see T4334."
+<?php
+<<<HEREDOC
+HEREDOC;
Index: src/parser/xhpast/__tests__/data/php-literal-index.php.test
===================================================================
--- /dev/null
+++ src/parser/xhpast/__tests__/data/php-literal-index.php.test
@@ -0,0 +1,2 @@
+# fail-syntax, comment="Wrong, supported in PHP 5.5, see T4334."
+<?php [1][0]; "X"[0];
Index: src/parser/xhpast/__tests__/data/php-yield.php.test
===================================================================
--- /dev/null
+++ src/parser/xhpast/__tests__/data/php-yield.php.test
@@ -0,0 +1,11 @@
+# fail-syntax, comment="Wrong, supported in PHP 5.5, see T4334."
+<?php
+
+function g() {
+ yield;
+ yield $x;
+ yield $y => $z;
+
+ $data = (yield $a);
+ $data = (yield $b => $c);
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mar 14 2025, 9:09 AM (5 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7652643
Default Alt Text
D8031.diff (1 KB)
Attached To
Mode
D8031: Add PHPAST test for remaining language features
Attached
Detach File
Event Timeline
Log In to Comment