Re: [PATCH] test: skip test with COLUMNS=1 under mksh

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] test: skip test with COLUMNS=1 under mksh

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:41

Zbigniew Jędrzejewski-Szmek [off-list ref] 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 wonder if this is an easier workaround, though.

	env COLUMNS=10 $cmd

In any case, I'd split this patch to three, as these tests belong to two
independent topics.

Re: [PATCH] test: skip test with COLUMNS=1 under mksh

From: Stefano Lattarini <hidden>
Date: 2016-06-15 22:53:41

Hi Junio, Zbigniew.

On 04/27/2012 06:21 PM, Junio C Hamano wrote:
Zbigniew Jędrzejewski-Szmek [off-list ref] writes:
quoted
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 wonder if this is an easier workaround, though.

	env COLUMNS=10 $cmd
It works for me:

  $ mksh -c 'COLUMNS=10 env | grep COLUMNS'
  COLUMNS=113

  $ mksh -c 'env COLUMNS=10 env | grep COLUMNS'
  COLUMNS=10

  $ dpkg -l mksh
  ...
  ii  mksh  40.2-2  MirBSD Korn Shell

HTH,
  Stefano

Re: [PATCH] test: skip test with COLUMNS=1 under mksh

From: Zbigniew Jędrzejewski-Szmek <hidden>
Date: 2016-06-15 22:53:41

On 04/28/2012 12:35 AM, Stefano Lattarini wrote:
Hi Junio, Zbigniew.

On 04/27/2012 06:21 PM, Junio C Hamano wrote:
quoted
Zbigniew Jędrzejewski-Szmek [off-list ref] writes:
quoted
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 wonder if this is an easier workaround, though.

	env COLUMNS=10 $cmd
It works for me:

  $ mksh -c 'COLUMNS=10 env | grep COLUMNS'
  COLUMNS=113

  $ mksh -c 'env COLUMNS=10 env | grep COLUMNS'
  COLUMNS=10

  $ dpkg -l mksh
  ...
  ii  mksh  40.2-2  MirBSD Korn Shell

HTH,
  Stefano
This approach with 'env COLUMNS=1 git ...' looks nicer, and works when
invoked directly, but doesn't work when run under the test harness,
because bin-wrappers/git uses !/bin/sh, which resets COLUMNS. So this
simpler approach doesn't look feasible.

Zbyszek
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help