diff options
-rw-r--r-- | test/test_posix_mq.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_posix_mq.rb b/test/test_posix_mq.rb index 33bb2a0..42be59a 100644 --- a/test/test_posix_mq.rb +++ b/test/test_posix_mq.rb @@ -96,6 +96,14 @@ class Test_POSIX_MQ < Test::Unit::TestCase assert_equal "hello", @mq.shift end + def test_shift_buf + buf = "" + @mq = POSIX_MQ.new @path, IO::CREAT|IO::RDWR, 0666 + @mq << "hello" + assert_equal "hello", @mq.shift(buf) + assert_equal "hello", buf + end + def test_send_receive @mq = POSIX_MQ.new @path, IO::CREAT|IO::RDWR, 0666 assert_nil @mq.send("hello", 0) |