From 7f952ae1ba814f29ee7107fdccb83d17eb13a629 Mon Sep 17 00:00:00 2001 From: "Darryl L. Pierce" Date: Mon, 18 Mar 2013 19:15:17 +0000 Subject: QPID-4493: Fixes memory leak in Perl bindings. Contributed by: Jimmy Jones git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1457923 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/bindings/qpid/perl/t/Message.t | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cpp/bindings') diff --git a/cpp/bindings/qpid/perl/t/Message.t b/cpp/bindings/qpid/perl/t/Message.t index 15baafb446..c656a7cf90 100644 --- a/cpp/bindings/qpid/perl/t/Message.t +++ b/cpp/bindings/qpid/perl/t/Message.t @@ -265,6 +265,13 @@ $map = qpid::messaging::decode_map($message); ok ($map->{name} eq "Euro=\x{20AC}", "Unicode strings encoded correctly."); +# Maps inside maps should work +$content = { id => 1234, name => { first => "tom" } }; +qpid::messaging::encode($content, $message); +$map = qpid::messaging::decode_map($message); +ok ($map->{name}{first} eq "tom", + "Map inside map encoded correctly."); + # Setting the content as a hash automatically encodes it ($content) = {"id" => "1234", "name" => "qpid"}; $message->set_content($content); -- cgit v1.2.1