diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-01-21 20:44:22 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-01-21 20:44:22 -0800 |
commit | c07cf2979036b9550566d59d6d4899be98f3e553 (patch) | |
tree | 9027f20298fbdbef49d4995c41c9cf9779c374e0 | |
parent | 1d0bf6f1d39e085948008c2c6d381ed929ac109e (diff) | |
download | ruby_posix_mq-c07cf2979036b9550566d59d6d4899be98f3e553.tar.gz |
-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) |