com php-src: Added test: Zend/tests/generators/generator_with _arg_unpacking.phpt
| From: | Dmitry Stogov | Date: | Wed, 11 May 2016 09:55:33 +0000 |
| Subject: | com php-src: Added test: Zend/tests/generators/generator_with _arg_unpacking.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92088@lists.php.net to get a copy of this message | ||
Commit: 515a61069a78db0277c54b85cb10b1ab2f52a13f
Author: Dmitry Stogov <dmitry@zend.com> Wed, 11 May 2016 12:55:33 +0300
Parents: 904ea128ee10fc90fa2b3e3259bb2241d16922ef
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=515a61069a78db0277c54b85cb10b1ab2f52a13f
Log:
Added test
Changed paths:
A Zend/tests/generators/generator_with_arg_unpacking.phpt
Diff:
diff --git a/Zend/tests/generators/generator_with_arg_unpacking.phpt
b/Zend/tests/generators/generator_with_arg_unpacking.phpt
new file mode 100644
index 0000000..edf0baf
--- /dev/null
+++ b/Zend/tests/generators/generator_with_arg_unpacking.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Generators with arguments unpacking
+--FILE--
+<?php
+(function() { yield; })(...range(1, 16384));
+call_user_func_array(function() { yield; }, range(1, 16384));
+$g = (function() { yield; })(...range(1, 16384));
+$g = call_user_func_array(function() { yield; }, range(1, 16384));
+echo "OK\n";
+?>
+--EXPECT--
+OK
\ No newline at end of file