From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id BD1971F4B4; Sat, 17 Oct 2020 08:17:01 +0000 (UTC) Date: Sat, 17 Oct 2020 08:17:01 +0000 From: Eric Wong To: meta@public-inbox.org Subject: [REVERT?] xt: add eml ->as_string round trip checker Message-ID: <20201017081701.GA4721@dcvr> References: <20200924205145.16754-1-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200924205145.16754-1-e@80x24.org> List-Id: Eric Wong wrote: > Unlike Email::MIME, PublicInbox::Eml::as_string should be able > to round trip from the Perl object to a raw scalar and back > without changes. Well, almost... As long as we don't use ->each_part. Will likely go with this revert: ----------8<---------- Subject: [PATCH] xt: remove eml_check_roundtrip If there's no body ({bdy} field), ->each_part set the {bdy} field to "\n" and the ->as_string result afterwards is one extra "\n" byte longer than the original. It's not worth extra cycles in common ->each_part calls to ensure 100% round-trip matches of header-only messages (which are likely spam), especially when the only difference is a trailing "\n". --- MANIFEST | 1 - xt/eml_check_roundtrip.t | 43 ---------------------------------------- 2 files changed, 44 deletions(-) delete mode 100644 xt/eml_check_roundtrip.t diff --git a/MANIFEST b/MANIFEST index 65fa8736..b6a681e9 100644 --- a/MANIFEST +++ b/MANIFEST @@ -385,7 +385,6 @@ t/xcpdb-reshard.t xt/cmp-msgstr.t xt/cmp-msgview.t xt/eml_check_limits.t -xt/eml_check_roundtrip.t xt/git-http-backend.t xt/git_async_cmp.t xt/httpd-async-stream.t diff --git a/xt/eml_check_roundtrip.t b/xt/eml_check_roundtrip.t deleted file mode 100644 index 9b216c53..00000000 -- --irreversible-delete was used with git-format-patch