summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-04-27 11:25:25 +0200
committerJunio C Hamano <gitster@pobox.com>2012-04-27 09:26:38 -0700
commitf78b1c5f8237d68fffe7c04d22bf93f2ad0bc730 (patch)
tree62af8e8a9c23c5813cf25ee5b32d2ce49edb471c
parent077539d734cdc4b0a3d2ea87fc487fa5c21d0311 (diff)
downloadgit-f78b1c5f8237d68fffe7c04d22bf93f2ad0bc730.tar.gz
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>
-rwxr-xr-xt/t9002-column.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t9002-column.sh b/t/t9002-column.sh
index ec288aeb95..fb71949ebd 100755
--- a/t/t9002-column.sh
+++ b/t/t9002-column.sh
@@ -50,8 +50,7 @@ EOF
test_cmp expected actual
'
-test_expect_success 'COLUMNS = 1' '
- cat >expected <<\EOF &&
+cat >expected <<\EOF
one
two
three
@@ -64,6 +63,8 @@ nine
ten
eleven
EOF
+
+test_expect_success COLUMNS_CAN_BE_1 'COLUMNS = 1' '
COLUMNS=1 git column --mode=column <lista >actual &&
test_cmp expected actual
'