From 9deab9cb456aa52ea9857663304f322b5c6be72d Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Sun, 4 Nov 2018 14:07:43 +0100 Subject: [PATCH] Fix test/tests/send/test-mimeify The size differences came from generated values of the Content-ID headers. They depend on the hostname and thus vary in length. leading to different MIME part sizes. The solution is replacing all Content-IDs with static values. The helper function replace_contentid() is added to commons.sh. --- test/common.sh | 6 ++++++ test/tests/send/test-mimeify | 18 +++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/test/common.sh b/test/common.sh index 1a67733..b869d56 100644 --- a/test/common.sh +++ b/test/common.sh @@ -80,6 +80,12 @@ progress_done() } +#### Replace generated Content-ID headers with static value +replace_contentid() +{ + sed "/^Content-ID/s/:.*/: /" "$@" +} + #### Filter that squeezes blank lines, partially emulating GNU cat -s, #### but sufficient for our purpose. diff --git a/test/tests/send/test-mimeify b/test/tests/send/test-mimeify index 3de45d7..f5a18aa 100644 --- a/test/tests/send/test-mimeify +++ b/test/tests/send/test-mimeify @@ -21,7 +21,7 @@ Subject: Test MIME foo ! -runandcheck 'send -debug "$draft" | sed "/^Content-ID/s/:.*/: /"' < To: alice Date: Sun, 25 Oct 2015 18:59:56 +0100 @@ -70,7 +70,7 @@ Date: Fri, 05 Aug 2016 21:38:40 +0200 -------- foo ! -runandcheck 'send -debug "$draft" | sed "/^Content-ID/s/:.*/: /"' </"' </"' <"$draft.temp" && mv "$draft.temp" "$draft" + runandcheck 'mhlist -v -file "$draft"' </"' <