test-lib: skip test with COLUMNS=1 under mksh

mksh does not allow $COLUMNS to be set below 12. mksh(1) says that $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=10 python -c 'import os; print os.environ["COLUMNS"]' 98 Add a test prerequisite by checking if we can set COLUMNS=1, to allow us to skip tests that needs it. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Zbigniew Jędrzejewski-Szmek committed Apr 27, 2012 at 11:25 UTC b082687cbac951d31bdea346404db5d0b99a0b73
1 file changed +1
t/test-lib.sh
+1
@@ -614,6 +614,7 @@ case $(uname -s) in
614 ;;
615 esac
616
617 +( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
618 test -z "$NO_PERL" && test_set_prereq PERL
619 test -z "$NO_PYTHON" && test_set_prereq PYTHON
620 test -n "$USE_LIBPCRE" && test_set_prereq LIBPCRE