Skip to content

Commit

Permalink
diff --stat: add a test for output with COLUMNS=40
Browse files Browse the repository at this point in the history
In preparation for the introduction on the limit of the width of the
graph part, a new test with COLUMNS=40 is added to check that the
environment variable influences diff, show, log, but not format-patch.
A new test is added because limiting the graph part makes COLUMNS=200
stop influencing diff --stat behaviour, which isn't wide enough now.
The old test with COLUMNS=200 is retained to check for regressions.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Zbigniew Jędrzejewski-Szmek authored and Junio C Hamano committed Mar 1, 2012
1 parent 1b058bc commit c4432d5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions t/t4052-stat-output.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,25 @@ respects expect200 show --stat
respects expect200 log -1 --stat
EOF

cat >expect40 <<'EOF'
abcd | 1000 ++++++++++++++++++++++++++
EOF

while read verb expect cmd args
do
test_expect_success "$cmd $verb not enough COLUMNS (big change)" '
COLUMNS=40 git $cmd $args >output
grep " | " output >actual &&
test_cmp "$expect" actual
'
done <<\EOF
ignores expect80 format-patch -1 --stdout
respects expect40 diff HEAD^ HEAD --stat
respects expect40 show --stat
respects expect40 log -1 --stat
EOF


cat >expect <<'EOF'
abcd | 1000 ++++++++++++++++++++++++++
EOF
Expand Down

0 comments on commit c4432d5

Please sign in to comment.