summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/lang/bug21800.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lang/bug21800.phpt b/tests/lang/bug21800.phpt
new file mode 100644
index 0000000000..b835425c3d
--- /dev/null
+++ b/tests/lang/bug21800.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #21800 (Segfault under interactive mode)
+--SKIPIF--
+<?php (PHP_SAPI != 'cli') and print "SKIP PHP binary is not cli"; ?>
+--FILE--
+<?php
+$fh = popen("{$_ENV['TEST_PHP_EXECUTABLE']} -a", 'w');
+if ($fh !== false) {
+ fwrite($fh, "<?php echo ':test:'; ?>\n\n");
+ fclose($fh);
+} else {
+ echo "failure\n";
+}
+?>
+--EXPECT--
+Interactive mode enabled
+
+:test: