Annotation of embedaddon/php/ext/sysvmsg/tests/001.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: send/receive serialized message.
                      3: --SKIPIF--
                      4: <?php // vim600:syn=php
                      5: if (!extension_loaded("sysvmsg")) print "skip"; ?>
                      6: --FILE--
                      7: <?php 
                      8: $key = ftok(dirname(__FILE__) . "/001.phpt", "p");
                      9: $q = msg_get_queue($key);
                     10: msg_send($q, 1, "hello") or print "FAIL\n";
                     11: $type = null;
                     12: if (msg_receive($q, 0, $type, 1024, $message)) {
                     13:        echo "TYPE: $type\n";
                     14:        echo "DATA: $message\n";
                     15: }
                     16: if (!msg_remove_queue($q)) {
                     17:        echo "BAD: queue removal failed\n";
                     18: }
                     19: ?>
                     20: --EXPECT--
                     21: TYPE: 1
                     22: DATA: hello

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>