]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/lei-mail-diff.t
hoist MailDiff and ContentDigestDbg out of lei
[public-inbox.git] / t / lei-mail-diff.t
diff --git a/t/lei-mail-diff.t b/t/lei-mail-diff.t
new file mode 100644 (file)
index 0000000..9398596
--- /dev/null
@@ -0,0 +1,14 @@
+#!perl -w
+# Copyright (C) all contributors <meta@public-inbox.org>
+# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
+use v5.12; use PublicInbox::TestCommon;
+
+test_lei(sub {
+       ok(!lei('mail-diff', 't/data/0001.patch', 't/data/binary.patch'),
+               'different messages are different');
+       like($lei_out, qr/^\+/m, 'diff shown');
+       lei_ok('mail-diff', 't/data/0001.patch', 't/data/0001.patch');
+       is($lei_out, '', 'no output if identical');
+});
+
+done_testing;