From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH] test/libconfig: use 'export' when restoring NOTMUCH_CONFIG
Date: Wed, 27 Oct 2021 21:04:06 +0300 [thread overview]
Message-ID: <m2r1c6bazt.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <20211027132040.3652962-1-david@tethera.net>
On Wed, Oct 27 2021, David Bremner wrote:
> This is required when NOTMUCH_CONFIG has been unset, and is harmless
> otherwise.
LGTM.
Tested w/ the following than the commit message is correct:
(works the same way w/ dash, bash and zsh)
--8<----8<----8<----8<--
export FOO
FOO=1
sh -c 'echo $FOO'
FOO=2
sh -c 'echo $FOO'
--8<----8<----8<----8<--
> ---
> test/T590-libconfig.sh | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh
> index 59b82a6f..a9566c13 100755
> --- a/test/T590-libconfig.sh
> +++ b/test/T590-libconfig.sh
> @@ -461,7 +461,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% %NULL%
> }
> EOF
> rm -f ${ovconfig}
> -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> cat <<'EOF' >EXPECTED
> == stdout ==
> test.key1 = overridden-home
> @@ -488,7 +488,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% %NULL%
> }
> EOF
> rm -f ${ovconfig}
> -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> cat <<'EOF' >EXPECTED
> == stdout ==
> test.key1 = overridden-xdg
> @@ -515,7 +515,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% work
> }
> EOF
> rm -f ${ovconfig}
> -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> cat <<'EOF' >EXPECTED
> == stdout ==
> test.key1 = overridden-xdg-profile
> @@ -541,7 +541,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% work
> }
> EOF
> #rm -f ${ovconfig}
> -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> cat <<'EOF' >EXPECTED
> == stdout ==
> test.key1 = overridden-profile
> @@ -559,7 +559,7 @@ cat c_head - c_tail <<'EOF' | test_C %NULL% '' %NULL%
> printf("NOT RUN");
> }
> EOF
> -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> cat <<'EOF' >EXPECTED
> == stdout ==
> == stderr ==
> @@ -604,7 +604,7 @@ cat c_head - c_tail <<'EOF' | test_C %NULL% '' %NULL%
> printf("test.key2 = %s\n", val);
> }
> EOF
> -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> unset NOTMUCH_DATABASE
> cat <<'EOF' >EXPECTED
> == stdout ==
> @@ -783,7 +783,7 @@ cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% %NULL%
> }
> EOF
> rm -f ${ovconfig}
> -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG}
> cat <<'EOF' >EXPECTED
> == stdout ==
> test.key1 = overridden-home
> --
> 2.33.0
>
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
next prev parent reply other threads:[~2021-10-27 18:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 13:20 [PATCH] test/libconfig: use 'export' when restoring NOTMUCH_CONFIG David Bremner
2021-10-27 18:04 ` Tomi Ollila [this message]
2021-10-28 1:12 ` David Bremner
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=m2r1c6bazt.fsf@guru.guru-group.fi \
--to=tomi.ollila@iki.fi \
--cc=david@tethera.net \
--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).