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>

Lucian Poston committed Apr 16, 2012 at 03:44 UTC 36dcc02c52cb60c751338591dbb3bf4d9cf5a753
1 file changed +25 -9
t/t4052-stat-output.sh
+25 -9
@@ -89,7 +89,7 @@ cat >expect200 <<'EOF'
89 abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
90 EOF
91 cat >expect200-graph <<'EOF'
92 -| abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
92 +| abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
93 EOF
94 while read verb expect cmd args
95 do
@@ -117,7 +117,7 @@ cat >expect40 <<'EOF'
117 abcd | 1000 ++++++++++++++++++++++++++
118 EOF
119 cat >expect40-graph <<'EOF'
120 -| abcd | 1000 ++++++++++++++++++++++++++
120 +| abcd | 1000 ++++++++++++++++++++++++
121 EOF
122 while read verb expect cmd args
123 do
@@ -127,12 +127,6 @@ do
127 test_cmp "$expect" actual
128 '
129
130 - test_expect_success "$cmd $verb statGraphWidth config" '
131 - git -c diff.statGraphWidth=26 $cmd $args >output
132 - grep " | " output >actual &&
133 - test_cmp "$expect" actual
134 - '
135 -
130 test "$cmd" != diff || continue
131
132 test_expect_success "$cmd --graph $verb not enough COLUMNS (big change)" '
@@ -140,6 +134,28 @@ do
134 grep " | " output >actual &&
135 test_cmp "$expect-graph" actual
136 '
137 +done <<\EOF
138 +ignores expect80 format-patch -1 --stdout
139 +respects expect40 diff HEAD^ HEAD --stat
140 +respects expect40 show --stat
141 +respects expect40 log -1 --stat
142 +EOF
143 +
144 +cat >expect40 <<'EOF'
145 + abcd | 1000 ++++++++++++++++++++++++++
146 +EOF
147 +cat >expect40-graph <<'EOF'
148 +| abcd | 1000 ++++++++++++++++++++++++++
149 +EOF
150 +while read verb expect cmd args
151 +do
152 + test_expect_success "$cmd $verb statGraphWidth config" '
153 + git -c diff.statGraphWidth=26 $cmd $args >output
154 + grep " | " output >actual &&
155 + test_cmp "$expect" actual
156 + '
157 +
158 + test "$cmd" != diff || continue
159
160 test_expect_success "$cmd --graph $verb statGraphWidth config" '
161 git -c diff.statGraphWidth=26 $cmd $args --graph >output
@@ -244,7 +260,7 @@ cat >expect200 <<'EOF'
260 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
261 EOF
262 cat >expect200-graph <<'EOF'
247 -| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
263 +| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
264 EOF
265 while read verb expect cmd args
266 do