]> granicus.if.org Git - php/commitdiff
This commit was manufactured by cvs2svn to create branch 'PHP_5_0'.
authorSVN Migration <svn@php.net>
Mon, 24 Jan 2005 14:19:55 +0000 (14:19 +0000)
committerSVN Migration <svn@php.net>
Mon, 24 Jan 2005 14:19:55 +0000 (14:19 +0000)
ext/sysvmsg/tests/002.phpt [new file with mode: 0644]

diff --git a/ext/sysvmsg/tests/002.phpt b/ext/sysvmsg/tests/002.phpt
new file mode 100644 (file)
index 0000000..b947f26
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+msg_recieve() should return false when unserialize() failed
+--SKIPIF--
+<?php if (!extension_loaded("sysvmsg")) die("skip sysvmsg extenions is not available")?>
+--FILE--
+<?php
+
+$queue = msg_get_queue (ftok(__FILE__, 'r'), 0600);
+if (!msg_send ($queue, 1, 'Hi', false /* ! no_ser*/, true/*block*/, $msg_err)) {
+       die("error\n");
+}
+var_dump($res = msg_receive ($queue, 1, $msg_type, 16384, $msg, true, 0, $msg_error));
+       
+echo "Done\n";
+?>
+--EXPECTF--
+Warning: msg_receive(): message corrupted in %s002.php on line %d
+bool(false)
+Done