Merge branch 'zj/mksh-columns-breakage'
authorJunio C Hamano <gitster@pobox.com>
Wed, 2 May 2012 20:51:53 +0000 (13:51 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 May 2012 20:51:53 +0000 (13:51 -0700)
A broken shell may not let us set an environment value to an arbitrary
value, interfering with some of the tests. Introduce a test prerequisite
so that we can skip some tests on such a platform.

By Zbigniew Jędrzejewski-Szmek
* zj/mksh-columns-breakage:
test-lib: skip test with COLUMNS=1 under mksh

1  2 
t/test-lib.sh
diff --combined t/test-lib.sh
index b7d7100c4e5c060c1956e5d4f372fa1fa6ee8c85,50a01b1c1d75f20cde4ba4b14c5fc451d783b045..9e2b71132ab7bca267be755999211783c9b77f43
@@@ -42,11 -42,10 +42,11 @@@ TZ=UT
  TERM=dumb
  export LANG LC_ALL PAGER TERM TZ
  EDITOR=:
 -unset VISUAL
 -unset EMAIL
 -unset LANGUAGE
 -unset $(perl -e '
 +# A call to "unset" with no arguments causes at least Solaris 10
 +# /usr/xpg4/bin/sh and /bin/ksh to bail out.  So keep the unsets
 +# deriving from the command substitution clustered with the other
 +# ones.
 +unset VISUAL EMAIL LANGUAGE COLUMNS $(perl -e '
        my @env = keys %ENV;
        my $ok = join("|", qw(
                TRACE
@@@ -615,6 -614,7 +615,7 @@@ case $(uname -s) i
        ;;
  esac
  
+ ( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
  test -z "$NO_PERL" && test_set_prereq PERL
  test -z "$NO_PYTHON" && test_set_prereq PYTHON
  test -n "$USE_LIBPCRE" && test_set_prereq LIBPCRE