Permalink
Browse files

added multipart sndmore test

  • Loading branch information...
1 parent 3e21f6f commit 04bff945311f2217bd20bb184d4841b27b9d10fd @tj tj committed Jan 26, 2012
Showing with 25 additions and 1 deletion.
  1. +1 −1 test/test.socket.multipart.message.js
  2. +24 −0 test/test.socket.multipart.sndmore.js
@@ -5,7 +5,7 @@ var zmq = require('../')
var push = zmq.socket('push')
, pull = zmq.socket('pull');
-pull.on('message', function(msg1,msg2,msg3){
+pull.on('message', function(msg1, msg2, msg3){
msg1.toString().should.equal('string');
msg2.toString().should.equal('15.99');
msg3.toString().should.equal('buffer');
@@ -0,0 +1,24 @@
+
+var zmq = require('../')
+ , should = require('should');
+
+var push = zmq.socket('push')
+ , pull = zmq.socket('pull');
+
+pull.on('message', function(a, b, c, d, e){
+ a.toString().should.equal('tobi');
+ b.toString().should.equal('loki');
+ c.toString().should.equal('jane');
+ d.toString().should.equal('luna');
+ e.toString().should.equal('manny');
+ push.close();
+ pull.close();
+});
+
+pull.bind('inproc://stuff', function(){
+ push.connect('inproc://stuff');
+ push.send(['tobi', 'loki'], zmq.ZMQ_SNDMORE);
+ push.send('jane', zmq.ZMQ_SNDMORE);
+ push.send('luna', zmq.ZMQ_SNDMORE);
+ push.send('manny');
+});

0 comments on commit 04bff94

Please sign in to comment.