1 # Copyright (C) 2017 all contributors <meta@public-inbox.org>
2 # This library is free software; you can redistribute it and/or modify
3 # it under the same terms as Perl itself.
4 # Artistic or GPL-1+ <https://www.gnu.org/licenses/gpl-1.0.txt>
8 use_ok 'PublicInbox::MIME';
9 use PublicInbox::MsgIter;
11 my $msg = PublicInbox::MIME->new(
12 'From: Richard Hansen <hansenr@google.com>
13 To: git@vger.kernel.org
14 Cc: Richard Hansen <hansenr@google.com>
15 Subject: [PATCH 0/2] minor diff orderfile documentation improvements
16 Date: Mon, 9 Jan 2017 19:40:29 -0500
17 Message-Id: <20170110004031.57985-1-hansenr@google.com>
18 X-Mailer: git-send-email 2.11.0.390.gc69c2f50cf-goog
19 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256;
20 boundary="94eb2c0bc864b76ba30545b2bca9"
22 --94eb2c0bc864b76ba30545b2bca9
25 diff: document behavior of relative diff.orderFile
26 diff: document the pattern format for diff.orderFile
28 Documentation/diff-config.txt | 5 ++++-
29 Documentation/diff-options.txt | 3 ++-
30 2 files changed, 6 insertions(+), 2 deletions(-)
33 --94eb2c0bc864b76ba30545b2bca9
34 Content-Type: application/pkcs7-signature; name="smime.p7s"
35 Content-Transfer-Encoding: base64
36 Content-Disposition: attachment; filename="smime.p7s"
37 Content-Description: (truncated) S/MIME Cryptographic Signature
39 dkTlB69771K2eXK4LcHSH/2LqX+VYa3K44vrx1ruzjXdNWzIpKBy0weFNiwnJCGofvCysM2RCSI1
40 --94eb2c0bc864b76ba30545b2bca9--
44 my @parts = $msg->parts;
45 my $exp = 'Richard Hansen (2):
46 diff: document behavior of relative diff.orderFile
47 diff: document the pattern format for diff.orderFile
49 Documentation/diff-config.txt | 5 ++++-
50 Documentation/diff-options.txt | 3 ++-
51 2 files changed, 6 insertions(+), 2 deletions(-)
55 ok($msg->isa('Email::MIME'), 'compatible with Email::MIME');
56 is($parts[0]->body, $exp, 'body matches expected');
59 my $raw = q^Date: Wed, 18 Jan 2017 13:28:32 -0500
60 From: Santiago Torres <santiago@nyu.edu>
61 To: Junio C Hamano <gitster@pobox.com>
62 Cc: git@vger.kernel.org, peff@peff.net, sunshine@sunshineco.com,
63 walters@verbum.org, Lukas Puehringer <luk.puehringer@gmail.com>
64 Subject: Re: [PATCH v6 4/6] builtin/tag: add --format argument for tag -v
65 Message-ID: <20170118182831.pkhqu2np3bh2puei@LykOS.localdomain>
66 References: <20170117233723.23897-1-santiago@nyu.edu>
67 <20170117233723.23897-5-santiago@nyu.edu>
68 <xmqqmvepb4oj.fsf@gitster.mtv.corp.google.com>
69 <xmqqh94wb4y0.fsf@gitster.mtv.corp.google.com>
71 Content-Type: multipart/signed; micalg=pgp-sha256;
72 protocol="application/pgp-signature"; boundary="r24xguofrazenjwe"
73 Content-Disposition: inline
74 In-Reply-To: <xmqqh94wb4y0.fsf@gitster.mtv.corp.google.com>
78 Content-Type: text/plain; charset=us-ascii
79 Content-Disposition: inline
80 Content-Transfer-Encoding: quoted-printable
82 your tree directly?=20
85 Content-Type: application/pgp-signature; name="signature.asc"
87 -----BEGIN PGP SIGNATURE-----
90 -----END PGP SIGNATURE-----
96 $msg = PublicInbox::MIME->new($raw);
99 my ($part, $level, @ex) = @{$_[0]};
101 is($part->body_str, "your tree directly? \r\n", 'body OK');
102 } elsif ($ex[0] == 2) {
103 is($part->body, "-----BEGIN PGP SIGNATURE-----\n\n" .
105 "-----END PGP SIGNATURE-----\n",
108 fail "unexpected part\n";
113 is($nr, 2, 'got 2 parts');
114 is($msg->as_string, $raw,
115 'stringified sufficiently close to original');