diff options
| author | Jake Woltersdorf <jake@playruyi.com> | 2019-03-12 17:26:39 +0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-03-12 20:01:27 -0700 |
| commit | fff28350a84ed60df173ba73f1035db4f7b383bd (patch) | |
| tree | 4f51223dd91302d8790ba90a4e6c659e89bc9f17 /tests | |
| parent | 6f25aa48a2ff0033073d6ee541748eccc685727d (diff) | |
| download | nng-fff28350a84ed60df173ba73f1035db4f7b383bd.tar.gz nng-fff28350a84ed60df173ba73f1035db4f7b383bd.tar.bz2 nng-fff28350a84ed60df173ba73f1035db4f7b383bd.zip | |
nng_msg_dup correctly duplicates pipe (mentioned in #862)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/message.c | 10 |
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); |
