about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-01-07 01:45:25 -0800
committerEric Wong <normalperson@yhbt.net>2010-01-07 01:45:25 -0800
commitb3c31cf444e2ca3dae0f6d2370944bfbf3382d88 (patch)
treee8c2776d4ff5abd590a30d1569c40f62b80358d9 /test
parent3700db51399e4949ed314ad0545d037b7762064e (diff)
downloadruby_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.rb6
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)