From: Luis Ressel <aranea@aixah.de>
To: notmuch@notmuchmail.org
Subject: [PATCH 1/2] test/T030-config: Separate stdout and stderr output
Date: Mon, 11 Mar 2019 18:14:48 +0100 [thread overview]
Message-ID: <20190311171449.28507-1-aranea@aixah.de> (raw)
POSIX doesn't specify the flushing behaviour of the STDOUT stream, so
it's invalid to assume a particular order between the stdout and stderr
output. The current test breaks on musl due to this.
---
test/T030-config.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/T030-config.sh b/test/T030-config.sh
index f36695c6..eba2e0e7 100755
--- a/test/T030-config.sh
+++ b/test/T030-config.sh
@@ -43,7 +43,8 @@ notmuch config set foo.nonexistent
test_expect_equal "$(notmuch config get foo.nonexistent)" ""
test_begin_subtest "List all items"
-notmuch config list 2>&1 | notmuch_config_sanitize > OUTPUT
+notmuch config list > STDOUT 2> STDERR
+printf "%s\n====\n%s\n" "$(< STDOUT)" "$(< STDERR)" | notmuch_config_sanitize > OUTPUT
if [ "${NOTMUCH_GMIME_MAJOR}" -lt 3 ]; then
config_gpg_path="crypto.gpg_path=gpg
@@ -51,7 +52,6 @@ if [ "${NOTMUCH_GMIME_MAJOR}" -lt 3 ]; then
fi
cat <<EOF > EXPECTED
-Error opening database at MAIL_DIR/.notmuch: No such file or directory
database.path=MAIL_DIR
user.name=Notmuch Test Suite
user.primary_email=test_suite@notmuchmail.org
@@ -65,6 +65,8 @@ foo.list=this;is another;list value;
built_with.compact=something
built_with.field_processor=something
built_with.retry_lock=something
+====
+Error opening database at MAIL_DIR/.notmuch: No such file or directory
EOF
test_expect_equal_file EXPECTED OUTPUT
--
2.21.0
next reply other threads:[~2019-03-11 17:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-11 17:14 Luis Ressel [this message]
2019-03-11 17:14 ` [PATCH 2/2] Prepend regerror() messages with "regexp error: " Luis Ressel
2019-03-12 10:53 ` [PATCH 1/2] test/T030-config: Separate stdout and stderr output David Bremner
2019-03-13 20:19 ` Tomi Ollila
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://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190311171449.28507-1-aranea@aixah.de \
--to=aranea@aixah.de \
--cc=notmuch@notmuchmail.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).