summaryrefslogtreecommitdiff
path: root/Zend/tests/match/009.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/match/009.phpt')
-rw-r--r--Zend/tests/match/009.phpt22
1 files changed, 22 insertions, 0 deletions
diff --git a/Zend/tests/match/009.phpt b/Zend/tests/match/009.phpt
new file mode 100644
index 0000000000..32153e7453
--- /dev/null
+++ b/Zend/tests/match/009.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Pretty printing for match expression
+--FILE--
+<?php
+
+assert((function () {
+ match ('foo') {
+ 'foo', 'bar' => false,
+ 'baz' => 'a',
+ default => 'b',
+ };
+})());
+
+?>
+--EXPECTF--
+Warning: assert(): assert(function () {
+ match ('foo') {
+ 'foo', 'bar' => false,
+ 'baz' => 'a',
+ default => 'b',
+ };
+}()) failed in %s on line %d