unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [REVERT?] xt: add eml ->as_string round trip checker
Date: Sat, 17 Oct 2020 08:17:01 +0000
Message-ID: <20201017081701.GA4721@dcvr> (raw)
In-Reply-To: <20200924205145.16754-1-e@80x24.org>

Eric Wong <e@80x24.org> 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

      reply	other threads:[~2020-10-17  8:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 20:51 [PATCH] " Eric Wong
2020-10-17  8:17 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201017081701.GA4721@dcvr \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

unofficial mirror of meta@public-inbox.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://yhetil.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.public-inbox.meta
	nntp://news.public-inbox.org/inbox.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git