t4052: Adjust --graph --stat output for prefixes
Adjust tests to verify that the commit history graph tree is taken into consideration when the diff stat output width is calculated. Signed-off-by: Lucian Poston <lucian.poston@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
3f1451326a
commit
36dcc02c52
@ -89,7 +89,7 @@ cat >expect200 <<'EOF'
|
||||
abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
EOF
|
||||
cat >expect200-graph <<'EOF'
|
||||
| abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
| abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
EOF
|
||||
while read verb expect cmd args
|
||||
do
|
||||
@ -117,7 +117,7 @@ cat >expect40 <<'EOF'
|
||||
abcd | 1000 ++++++++++++++++++++++++++
|
||||
EOF
|
||||
cat >expect40-graph <<'EOF'
|
||||
| abcd | 1000 ++++++++++++++++++++++++++
|
||||
| abcd | 1000 ++++++++++++++++++++++++
|
||||
EOF
|
||||
while read verb expect cmd args
|
||||
do
|
||||
@ -127,12 +127,6 @@ do
|
||||
test_cmp "$expect" actual
|
||||
'
|
||||
|
||||
test_expect_success "$cmd $verb statGraphWidth config" '
|
||||
git -c diff.statGraphWidth=26 $cmd $args >output
|
||||
grep " | " output >actual &&
|
||||
test_cmp "$expect" actual
|
||||
'
|
||||
|
||||
test "$cmd" != diff || continue
|
||||
|
||||
test_expect_success "$cmd --graph $verb not enough COLUMNS (big change)" '
|
||||
@ -140,6 +134,28 @@ do
|
||||
grep " | " output >actual &&
|
||||
test_cmp "$expect-graph" 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 >expect40 <<'EOF'
|
||||
abcd | 1000 ++++++++++++++++++++++++++
|
||||
EOF
|
||||
cat >expect40-graph <<'EOF'
|
||||
| abcd | 1000 ++++++++++++++++++++++++++
|
||||
EOF
|
||||
while read verb expect cmd args
|
||||
do
|
||||
test_expect_success "$cmd $verb statGraphWidth config" '
|
||||
git -c diff.statGraphWidth=26 $cmd $args >output
|
||||
grep " | " output >actual &&
|
||||
test_cmp "$expect" actual
|
||||
'
|
||||
|
||||
test "$cmd" != diff || continue
|
||||
|
||||
test_expect_success "$cmd --graph $verb statGraphWidth config" '
|
||||
git -c diff.statGraphWidth=26 $cmd $args --graph >output
|
||||
@ -244,7 +260,7 @@ cat >expect200 <<'EOF'
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
EOF
|
||||
cat >expect200-graph <<'EOF'
|
||||
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
EOF
|
||||
while read verb expect cmd args
|
||||
do
|
||||
|
Loading…
Reference in New Issue
Block a user