Skip to content

Commit c4432d5

Browse files
keszybzgitster
authored andcommitted
diff --stat: add a test for output with COLUMNS=40
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1b058bc commit c4432d5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

t/t4052-stat-output.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,25 @@ respects expect200 show --stat
101101
respects expect200 log -1 --stat
102102
EOF
103103

104+
cat >expect40 <<'EOF'
105+
abcd | 1000 ++++++++++++++++++++++++++
106+
EOF
107+
108+
while read verb expect cmd args
109+
do
110+
test_expect_success "$cmd $verb not enough COLUMNS (big change)" '
111+
COLUMNS=40 git $cmd $args >output
112+
grep " | " output >actual &&
113+
test_cmp "$expect" actual
114+
'
115+
done <<\EOF
116+
ignores expect80 format-patch -1 --stdout
117+
respects expect40 diff HEAD^ HEAD --stat
118+
respects expect40 show --stat
119+
respects expect40 log -1 --stat
120+
EOF
121+
122+
104123
cat >expect <<'EOF'
105124
abcd | 1000 ++++++++++++++++++++++++++
106125
EOF

0 commit comments

Comments
 (0)