diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-01-07 01:45:25 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-01-07 01:45:25 -0800 |
commit | b3c31cf444e2ca3dae0f6d2370944bfbf3382d88 (patch) | |
tree | e8c2776d4ff5abd590a30d1569c40f62b80358d9 /test | |
parent | 3700db51399e4949ed314ad0545d037b7762064e (diff) | |
download | ruby_posix_mq-b3c31cf444e2ca3dae0f6d2370944bfbf3382d88.tar.gz |
This acts like POSIX_MQ#receive but only returns the message without the priority.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_posix_mq.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_posix_mq.rb b/test/test_posix_mq.rb index 1fa029b..33bb2a0 100644 --- a/test/test_posix_mq.rb +++ b/test/test_posix_mq.rb @@ -90,6 +90,12 @@ class Test_POSIX_MQ < Test::Unit::TestCase assert_equal [ "world", 0 ], @mq.receive end + def test_shift + @mq = POSIX_MQ.new @path, IO::CREAT|IO::RDWR, 0666 + @mq << "hello" + assert_equal "hello", @mq.shift + end + def test_send_receive @mq = POSIX_MQ.new @path, IO::CREAT|IO::RDWR, 0666 assert_nil @mq.send("hello", 0) |