aboutsummaryrefslogtreecommitdiff
path: root/tests/message.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/message.c')
-rw-r--r--tests/message.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/message.c b/tests/message.c
index 4c0af912..cc50f542 100644
--- a/tests/message.c
+++ b/tests/message.c
@@ -186,6 +186,16 @@ TestMain("Message Tests", {
So(strcmp(nng_msg_body(m2), "back2basics") == 0);
});
+ Convey("Message dup copies pipe", {
+ nng_pipe p = NNG_PIPE_INITIALIZER;
+ nng_msg *m2;
+ memset(&p, 0x22, sizeof(p));
+ nng_msg_set_pipe(msg, p);
+ So(nng_msg_dup(&m2, msg) == 0);
+ p = nng_msg_get_pipe(m2);
+ So(nng_pipe_id(p) == 0x22222222);
+ });
+
Convey("Missing option fails properly", {
char buf[128];
size_t sz = sizeof(buf);