+EOF
+
+ is($parts[0]->body, $exp, 'body matches expected');
+
+ my $raw = <<'EOF';
+Date: Wed, 18 Jan 2017 13:28:32 -0500
+From: Santiago Torres <santiago@nyu.edu>
+To: Junio C Hamano <gitster@pobox.com>
+Cc: git@vger.kernel.org, peff@peff.net, sunshine@sunshineco.com,
+ walters@verbum.org, Lukas Puehringer <luk.puehringer@gmail.com>
+Subject: Re: [PATCH v6 4/6] builtin/tag: add --format argument for tag -v
+Message-ID: <20170118182831.pkhqu2np3bh2puei@LykOS.localdomain>
+References: <20170117233723.23897-1-santiago@nyu.edu>
+ <20170117233723.23897-5-santiago@nyu.edu>
+ <xmqqmvepb4oj.fsf@gitster.mtv.corp.google.com>
+ <xmqqh94wb4y0.fsf@gitster.mtv.corp.google.com>
+MIME-Version: 1.0
+Content-Type: multipart/signed; micalg=pgp-sha256;
+ protocol="application/pgp-signature"; boundary="r24xguofrazenjwe"
+Content-Disposition: inline
+In-Reply-To: <xmqqh94wb4y0.fsf@gitster.mtv.corp.google.com>
+
+
+--r24xguofrazenjwe
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+Content-Transfer-Encoding: quoted-printable
+
+your tree directly?=20
+
+--r24xguofrazenjwe
+Content-Type: application/pgp-signature; name="signature.asc"
+
+-----BEGIN PGP SIGNATURE-----
+
+=7wIb
+-----END PGP SIGNATURE-----
+
+--r24xguofrazenjwe--
+
+EOF
+
+ $msg = $cls->new($raw);
+ my $nr = 0;
+ msg_iter($msg, sub {
+ my ($part, $level, @ex) = @{$_[0]};
+ is($level, 1, 'at expected level');
+ if (join('fail if $#ex > 0', @ex) eq '1') {
+ is($part->body_str, "your tree directly? \r\n",
+ 'body OK');
+ } elsif (join('fail if $#ex > 0', @ex) eq '2') {
+ is($part->body, "-----BEGIN PGP SIGNATURE-----\n\n" .
+ "=7wIb\n" .
+ "-----END PGP SIGNATURE-----\n",
+ 'sig "matches"');
+ } else {
+ fail "unexpected part\n";
+ }
+ $nr++;
+ });