unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Luis Ressel <aranea@aixah.de>, notmuch@notmuchmail.org
Subject: Re: [PATCH] test: Ignore subtly different behaviour of the musl libc
Date: Mon, 04 Mar 2019 08:04:21 -0400	[thread overview]
Message-ID: <87zhqax2uy.fsf@tethera.net> (raw)
In-Reply-To: <20190226020629.5273-1-aranea@aixah.de>

Luis Ressel <aranea@aixah.de> writes:

> ---
>  test/T030-config.sh       | 6 ++++--
>  test/T650-regexp-query.sh | 4 ++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
>

In general we want more verbose commit messages for notmuch
(https://notmuchmail.org/contributing/#index5h2)

> +test_begin_subtest "List all items (stderr output)"
> +test_expect_equal "$(notmuch_config_sanitize <OUTPUT-ERR)" "Error opening database at MAIL_DIR/.notmuch: No such file or directory"
> +

The first change looks OK. Another option would be to cat the two files
into one in the test with a seperator. That's how the test_C based tests work.

>  test_begin_subtest "Top level --config=FILE option"
>  cp "${NOTMUCH_CONFIG}" alt-config
>  notmuch --config=alt-config config set user.name "Another Name"
> diff --git a/test/T650-regexp-query.sh b/test/T650-regexp-query.sh
> index 4085340f..9ba3cd64 100755
> --- a/test/T650-regexp-query.sh
> +++ b/test/T650-regexp-query.sh
> @@ -137,10 +137,10 @@ EOF
>  test_expect_equal_file EXPECTED OUTPUT
>  
>  test_begin_subtest "regexp error reporting"
> -notmuch search 'from:/unbalanced[/' 1>OUTPUT 2>&1
> +notmuch search 'from:/unbalanced[/' 2>&1 | sed -e 's/^\(A Xapian[^:]*:\).*/\1/' > OUTPUT
>  cat <<EOF > EXPECTED
>  notmuch search: A Xapian exception occurred
> -A Xapian exception occurred parsing query: Invalid regular expression
> +A Xapian exception occurred parsing query:
>  Query string was: from:/unbalanced[/
>  EOF

This seems to lose the fact that a regexp parsing error occured.  One
option would be to change the actual error message so the initial
predictable part of the error message contained some string like
"regexp".

d

  reply	other threads:[~2019-03-04 12:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26  2:06 [PATCH] test: Ignore subtly different behaviour of the musl libc Luis Ressel
2019-03-04 12:04 ` David Bremner [this message]
2019-03-10 19:29   ` Luis Ressel
2019-03-11  9:59     ` David Bremner
2019-03-10 20:32 ` 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=87zhqax2uy.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=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).