test/sysv_mq_test.rb in sysvmq-0.1.0 vs test/sysv_mq_test.rb in sysvmq-0.1.1

- old
+ new

@@ -87,11 +87,11 @@ assert_equal "5", @mq.receive(-7) assert_equal "10", @mq.receive(-10) end def test_responds_to_sigint - pid = fork { + pid = fork { begin mq = SysVMQ.new(0xDEADCAFE, 2048, SysVMQ::IPC_CREAT | 0660) mq.receive rescue Interrupt mq.destroy @@ -114,7 +114,13 @@ def test_nonblocking_send_and_receive message = "Hello World" @mq.send(message, 1, SysVMQ::IPC_NOWAIT) assert_equal message, @mq.receive(0, SysVMQ::IPC_NOWAIT) + end + + def test_string_key_and_gc + assert_raises TypeError do + SysVMQ.new("0xDEADC0DE", @size, SysVMQ::IPC_CREAT | 0666) + end end end