summaryrefslogtreecommitdiff
path: root/ext/phar/tests/open_for_write_existing.phpt
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2008-04-14 16:38:58 +0000
committerGreg Beaver <cellog@php.net>2008-04-14 16:38:58 +0000
commit6d06058e8167e612b2f2f8c2d41fd626222b2136 (patch)
tree717b4af212090ce26cf7b7b4d1445ace5acc2918 /ext/phar/tests/open_for_write_existing.phpt
parentabb0766b8fb50dd01957bd7c53a3739668ea3490 (diff)
downloadphp-git-6d06058e8167e612b2f2f8c2d41fd626222b2136.tar.gz
add test coverage for fopen() with append mode
Diffstat (limited to 'ext/phar/tests/open_for_write_existing.phpt')
-rw-r--r--ext/phar/tests/open_for_write_existing.phpt7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/phar/tests/open_for_write_existing.phpt b/ext/phar/tests/open_for_write_existing.phpt
index e9e2c05b9e..a3313b80ef 100644
--- a/ext/phar/tests/open_for_write_existing.phpt
+++ b/ext/phar/tests/open_for_write_existing.phpt
@@ -21,11 +21,16 @@ $fp = fopen($pname . '/b/c.php', 'wb');
fwrite($fp, 'extra');
fclose($fp);
include $pname . '/b/c.php';
+
+// add edge case test for append
+$a = fopen($pname . '/b/c.php', 'a');
?>
===DONE===
--CLEAN--
<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
---EXPECT--
+--EXPECTF--
extra
+Warning: fopen(phar://%sopen_for_write_existing.phar.php/b/c.php): failed to open stream: phar error: open mode append not supported in %sopen_for_write_existing.php on line %d
+
===DONE===