diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-11-05 02:54:08 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-11-05 03:07:39 +0100 |
commit | 275b39fe4bf19f244114dbefa58e0d77047eff4a (patch) | |
tree | cfc43742b5e181606663eae253f2e02c40d86476 /src/libsystemd-bus/test-bus-marshal.c | |
parent | 9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75 (diff) |
bus: support entering containers without specifying the type
On request om Tom Gundersen...
Diffstat (limited to 'src/libsystemd-bus/test-bus-marshal.c')
-rw-r--r-- | src/libsystemd-bus/test-bus-marshal.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/libsystemd-bus/test-bus-marshal.c b/src/libsystemd-bus/test-bus-marshal.c index 8f270896a8..2a27e623f6 100644 --- a/src/libsystemd-bus/test-bus-marshal.c +++ b/src/libsystemd-bus/test-bus-marshal.c @@ -252,9 +252,28 @@ int main(int argc, char *argv[]) { assert_se(sd_bus_message_verify_type(m, 'b', NULL) > 0); - r = sd_bus_message_read(m, "ba(ss)", &boolean, 3, &x, &y, &a, &b, &c, &d); + r = sd_bus_message_read(m, "b", &boolean); assert_se(r > 0); assert_se(boolean); + + r = sd_bus_message_enter_container(m, 0, NULL); + assert_se(r > 0); + + r = sd_bus_message_read(m, "(ss)", &x, &y); + assert_se(r > 0); + + r = sd_bus_message_read(m, "(ss)", &a, &b); + assert_se(r > 0); + + r = sd_bus_message_read(m, "(ss)", &c, &d); + assert_se(r > 0); + + r = sd_bus_message_read(m, "(ss)", &x, &y); + assert_se(r == 0); + + r = sd_bus_message_exit_container(m); + assert_se(r >= 0); + assert_se(streq(x, "aaa")); assert_se(streq(y, "1")); assert_se(streq(a, "bbb")); |