t9002: work around shells that are unable to set COLUMNS to 1

In t9002-column.sh, file with expected output was shared between two
test cases, but set in the first one. Since the first test case can
now be skipped, setting up the expected output is moved outside of the
test case.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2012-04-27 11:25:25 +02:00 committed by Junio C Hamano
parent 077539d734
commit f78b1c5f82

View File

@ -50,8 +50,7 @@ EOF
test_cmp expected actual test_cmp expected actual
' '
test_expect_success 'COLUMNS = 1' ' cat >expected <<\EOF
cat >expected <<\EOF &&
one one
two two
three three
@ -64,6 +63,8 @@ nine
ten ten
eleven eleven
EOF EOF
test_expect_success COLUMNS_CAN_BE_1 'COLUMNS = 1' '
COLUMNS=1 git column --mode=column <lista >actual && COLUMNS=1 git column --mode=column <lista >actual &&
test_cmp expected actual test_cmp expected actual
' '