test/test_socket.rb in rbczmq-1.7.3 vs test/test_socket.rb in rbczmq-1.7.4

- old
+ new

@@ -273,9 +273,22 @@ assert req.send("hi %d") assert_equal "hi %d", rep.recv ensure ctx.destroy end + + def test_send_receive_with_null_in_string + string = [1,0,1,2,3,4,5].pack('c*') + ctx = ZMQ::Context.new + rep = ctx.socket(:PAIR) + rep.bind("inproc://test.socket-send_receive") + req = ctx.socket(:PAIR) + req.connect("inproc://test.socket-send_receive") + assert req.send(string) + assert_equal string, rep.recv + ensure + ctx.destroy + end def test_verbose ctx = ZMQ::Context.new rep = ctx.socket(:PAIR) rep.verbose = true