git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Firmin Martin <firminmartin24@gmail.com>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/2] t/README: document test_config
Date: Fri, 14 May 2021 03:02:42 -0400	[thread overview]
Message-ID: <CAPig+cRrVN0cqoRFA90XYSsDcJ-PZxLMNfFCye4pUXz47AhpYw@mail.gmail.com> (raw)
In-Reply-To: <20210514065508.247044-1-firminmartin24@gmail.com>

On Fri, May 14, 2021 at 2:55 AM Firmin Martin <firminmartin24@gmail.com> wrote:
> test_config is used over one thousand times in the test suite, yet not
> documented. Give it a place in the "Test harness library" section.
>
> Signed-off-by: Firmin Martin <firminmartin24@gmail.com>
> ---
> diff --git a/t/README b/t/README
> @@ -1046,6 +1046,21 @@ library for your script to use.
> + - test_config <config-option> [<value>]
> +
> +   Set the configuration option <config-option> to <value>, and unset it at the
> +   end of the current test. For a similar purpose, test_config_global for
> +   global configuration is also available. Note, however, that test_config_*
> +   should not be used under a subshell.

"should" is perhaps too weak of a word. test_config() will not
function correctly at all (just as test_when_finished() will not
function correctly) within a subshell. So, perhaps say "must not be
used in a subshell."

  parent reply	other threads:[~2021-05-14  7:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14  6:55 [PATCH 1/2] t/README: document test_config Firmin Martin
2021-05-14  6:55 ` [PATCH 2/2] t: use test_config whenever possible Firmin Martin
2021-05-15 20:15   ` Felipe Contreras
2021-05-15 20:21     ` Felipe Contreras
2021-05-15 22:00       ` Firmin Martin
2021-05-14  7:02 ` Eric Sunshine [this message]
2021-05-15 14:43   ` [PATCH 1/2] t/README: document test_config Firmin Martin
2021-05-15 15:27 ` [PATCH v2 0/2] document test_config & use it whenever possible Firmin Martin
2021-05-15 15:27   ` [PATCH v2 1/2] t/README: document test_config Firmin Martin
2021-05-16  5:03     ` Bagas Sanjaya
2021-05-17  7:44       ` Firmin Martin
2021-05-15 15:27   ` [PATCH v2 2/2] t: use test_config whenever possible Firmin Martin
2021-05-16  5:02     ` Junio C Hamano
2021-05-17  6:08       ` Firmin Martin
2021-05-17  6:55         ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=CAPig+cRrVN0cqoRFA90XYSsDcJ-PZxLMNfFCye4pUXz47AhpYw@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=firminmartin24@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
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 NNTP newsgroup(s).