From: Zbigniew Jędrzejewski-Szmek Date: Fri, 24 Feb 2012 20:32:15 GMT Subject: [PATCH v7 08/11] diff --stat: add a test for output with COLUMNS=40 Message-ID: <1330115538-1576-8-git-send-email-zbyszek@in.waw.pl> In-Reply-To: <1330115538-1576-1-git-send-email-zbyszek@in.waw.pl> 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 --- t/t4052-stat-output.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh index c250744..84be8bd 100755 --- a/t/t4052-stat-output.sh +++ b/t/t4052-stat-output.sh @@ -99,6 +99,25 @@ respects expect200 show --stat respects expect200 log -1 --stat EOF +cat >expect40 <<'EOF' + abcd | 1000 ++++++++++++++++++++++++++ +EOF + +while read verb expect cmd args +do + test_expect_success "$cmd $verb not enough COLUMNS (big change)" ' + COLUMNS=40 git $cmd $args >output + grep " | " output >actual && + test_cmp "$expect" 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 >expect <<'EOF' abcd | 1000 ++++++++++++++++++++++++++ EOF -- 1.7.9.2.332.g05f13