From: Eric Sunshine <sunshine@sunshineco.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Git List" <git@vger.kernel.org>,
"Junio C Hamano" <gitster@pobox.com>,
"Alex Henrie" <alexhenrie24@gmail.com>,
"Felipe Contreras" <felipe.contreras@gmail.com>,
"Fabian Stelzer" <fabian.stelzer@campoint.net>,
"Jeff King" <peff@peff.net>,
"Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>
Subject: Re: [PATCH v2 2/3] test-lib-functions.sh: add a test_with_columns function
Date: Mon, 2 Aug 2021 13:24:07 -0400 [thread overview]
Message-ID: <CAPig+cS5MyZ9iFC3kaipMmPSq93DoiQzoFffYds9rASOkJXWFg@mail.gmail.com> (raw)
In-Reply-To: <20210802171429.GC23408@szeder.dev>
On Mon, Aug 2, 2021 at 1:14 PM SZEDER Gábor <szeder.dev@gmail.com> wrote:
> On Mon, Aug 02, 2021 at 03:46:27PM +0200, Ævar Arnfjörð Bjarmason wrote:
> > +# Test a with a given number of COLUMNS in the environment.
> > +test_with_columns () {
> > + local columns=$1
> > + shift
> > +
> > + COLUMNS=$columns "$@"
> > +}
>
> This function needs some redirections to separate the tested command's
> standard error from the function's '-x' trace, see a5bf824f3b (t:
> prevent '-x' tracing from interfering with test helpers' stderr,
> 2018-02-25).
This is also potentially problematic when a test is expected to fail,
in which case we avoid the:
FOO=bar command
idiom and instead use:
test_must_fail env FOO=bar command
next prev parent reply other threads:[~2021-08-02 17:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 12:39 progress test failure on fedora34 Fabian Stelzer
2021-07-14 15:35 ` Ævar Arnfjörð Bjarmason
2021-07-14 16:35 ` Alex Henrie
2021-07-18 8:05 ` Ævar Arnfjörð Bjarmason
2021-07-19 9:00 ` Jeff King
2021-07-19 17:18 ` Alex Henrie
2021-07-19 18:21 ` Alex Henrie
2021-07-19 18:43 ` Felipe Contreras
2021-07-19 19:34 ` Felipe Contreras
2021-07-19 20:42 ` Alex Henrie
2021-07-20 0:40 ` Felipe Contreras
2021-07-21 0:45 ` ZheNing Hu
2021-07-21 2:50 ` Felipe Contreras
2021-07-26 23:57 ` [PATCH] test-lib.sh: use GIT_TEST_COLUMNS over COLUMNS Ævar Arnfjörð Bjarmason
2021-07-27 17:38 ` Jeff King
2021-07-28 0:53 ` Junio C Hamano
2021-08-02 13:46 ` [PATCH v2 0/3] " Ævar Arnfjörð Bjarmason
2021-08-02 13:46 ` [PATCH v2 1/3] test-lib-functions.sh: rename test_must_fail_acceptable() Ævar Arnfjörð Bjarmason
2021-08-02 13:46 ` [PATCH v2 2/3] test-lib-functions.sh: add a test_with_columns function Ævar Arnfjörð Bjarmason
2021-08-02 17:14 ` SZEDER Gábor
2021-08-02 17:24 ` Eric Sunshine [this message]
2021-08-02 13:46 ` [PATCH v2 3/3] test-lib.sh: use GIT_TEST_COLUMNS over COLUMNS Ævar Arnfjörð Bjarmason
2021-08-04 23:05 ` [PATCH v3 0/3] " Ævar Arnfjörð Bjarmason
2021-08-04 23:05 ` [PATCH v3 1/3] test-lib-functions.sh: rename test_must_fail_acceptable() Ævar Arnfjörð Bjarmason
2021-08-04 23:05 ` [PATCH v3 2/3] test-lib-functions.sh: add a test_with_columns function Ævar Arnfjörð Bjarmason
2021-08-04 23:05 ` [PATCH v3 3/3] test-lib.sh: use GIT_TEST_COLUMNS over COLUMNS Ævar Arnfjörð Bjarmason
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+cS5MyZ9iFC3kaipMmPSq93DoiQzoFffYds9rASOkJXWFg@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=alexhenrie24@gmail.com \
--cc=avarab@gmail.com \
--cc=fabian.stelzer@campoint.net \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=szeder.dev@gmail.com \
--cc=zbyszek@in.waw.pl \
/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).