aboutsummaryrefslogtreecommitdiff
path: root/t/t4052-stat-output.sh
diff options
context:
space:
mode:
authorLucian Poston <lucian.poston@gmail.com>2012-04-16 03:44:52 -0700
committerJunio C Hamano <gitster@pobox.com>2012-04-16 11:31:46 -0700
commit36dcc02c52cb60c751338591dbb3bf4d9cf5a753 (patch)
tree493288443dce0a0850dbf0134fcefbeb59b832c6 /t/t4052-stat-output.sh
parent3f1451326a09a4e36c10feff65685daef1d29c32 (diff)
downloadgit-36dcc02c52cb60c751338591dbb3bf4d9cf5a753.tar.gz
git-36dcc02c52cb60c751338591dbb3bf4d9cf5a753.tar.xz
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>
Diffstat (limited to 't/t4052-stat-output.sh')
-rwxr-xr-xt/t4052-stat-output.sh34
1 files changed, 25 insertions, 9 deletions
diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
index da1498458..d748e5e65 100755
--- a/t/t4052-stat-output.sh
+++ b/t/t4052-stat-output.sh
@@ -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