From: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in•waw.pl>
To: Junio C Hamano <gitster@pobox•com>
Cc: Kacper Kornet <draenog@pld-linux•org>,
git@vger•kernel.org, Lucian Poston <lucian.poston@gmail•com>
Subject: Re: [PATCH] test: skip test with COLUMNS=1 under mksh
Date: Sat, 28 Apr 2012 13:09:18 +0200 [thread overview]
Message-ID: <4F9BCFDE.1090103@in.waw.pl> (raw)
In-Reply-To: <xmqqehr99mz3.fsf@junio.mtv.corp.google.com>
On 04/27/2012 06:08 PM, Junio C Hamano wrote:
> Zbigniew Jędrzejewski-Szmek <zbyszek@in•waw.pl> writes:
>
>> mksh does not allow $COLUMNS to be set below 12. Quoting mksh(1)
>> $COLUMNS is "always set, defaults to 80, unless the value as reported
>> by stty(1) is non-zero and sane enough". This applies also to setting
>> it directly for one command:
>>
>> $ COLUMNS=30 python -c 'import os; print os.environ["COLUMNS"]'
>> 30
>> $ COLUMNS=20 python -c 'import os; print os.environ["COLUMNS"]'
>> 20
>> $ COLUMNS=10 python -c 'import os; print os.environ["COLUMNS"]'
>> 98
>
> I'd hate to say this, but that shell is broken.
Yes.
>> Let's test if we can set COLUMNS=1, and if not, skip the tests that
>> want to use that. A prereq is added, which is set if $COLUMNS can be
>> set.
>
> And I think that is a sensible workaround, even though COLUMNS_CAN_BE_1
> might not be the best name for it.
>
>> +( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
>
> This is different from what you wrote in your log message, but I trust
> that it will fail under the problematic shell?
Yes.
> Will queue; thanks.
Cool.
Zbyszek
next prev parent reply other threads:[~2012-04-29 17:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 2:29 [PATCH v4 1/4] t4052: test --stat output with --graph Lucian Poston
2012-04-18 2:29 ` [PATCH v4 2/4] Adjust stat width calculations to take --graph output into account Lucian Poston
2012-04-18 2:29 ` [PATCH v4 3/4] t4052: Test diff-stat output with minimum columns Lucian Poston
2012-04-18 20:15 ` Junio C Hamano
2012-04-18 21:19 ` Lucian Poston
2012-04-18 21:09 ` Lucian Poston
2012-04-26 22:34 ` Kacper Kornet
2012-04-27 9:25 ` [PATCH] test: skip test with COLUMNS=1 under mksh Zbigniew Jędrzejewski-Szmek
2012-04-27 16:08 ` Junio C Hamano
2012-04-28 11:09 ` Zbigniew Jędrzejewski-Szmek [this message]
2012-04-27 16:21 ` Junio C Hamano
2012-04-27 22:35 ` Stefano Lattarini
2012-04-28 11:09 ` Zbigniew Jędrzejewski-Szmek
2012-04-29 21:28 ` Junio C Hamano
2012-04-18 2:29 ` [PATCH v4 4/4] Prevent graph_width of stat width from falling below min Lucian Poston
2012-04-18 21:12 ` Lucian Poston
2012-04-18 8:47 ` [PATCH v4 1/4] t4052: test --stat output with --graph Zbigniew Jędrzejewski-Szmek
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=4F9BCFDE.1090103@in.waw.pl \
--to=zbyszek@in$(echo .)waw.pl \
--cc=draenog@pld-linux$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=lucian.poston@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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