From: Lucian Poston Date: Mon, 16 Apr 2012 10:44:52 +0000 (-0700) Subject: t4052: Adjust --graph --stat output for prefixes X-Git-Tag: v1.7.10.2~20^2~4 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=36dcc02c52cb60c751338591dbb3bf4d9cf5a753;p=git-core%2Fgit.git 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 Signed-off-by: Junio C Hamano --- 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