]> granicus.if.org Git - php/commitdiff
Added test case for bug #21800
authorMoriyoshi Koizumi <moriyoshi@php.net>
Tue, 21 Jan 2003 19:38:08 +0000 (19:38 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Tue, 21 Jan 2003 19:38:08 +0000 (19:38 +0000)
tests/lang/bug21800.phpt [new file with mode: 0644]

diff --git a/tests/lang/bug21800.phpt b/tests/lang/bug21800.phpt
new file mode 100644 (file)
index 0000000..b835425
--- /dev/null
@@ -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: