From: Lucian Poston <lucian.poston@gmail.com>
To: git@vger.kernel.org
Cc: "Lucian Poston" <lucian.poston@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>,
"Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>
Subject: Re: [PATCH v4 3/4] t4052: Test diff-stat output with minimum columns
Date: Wed, 18 Apr 2012 14:09:33 -0700 [thread overview]
Message-ID: <1334783377-31229-1-git-send-email-lucian.poston@gmail.com> (raw)
In-Reply-To: <1334716196-9870-3-git-send-email-lucian.poston@gmail.com>
When COLUMNS or --stat-width restricts the diff-stat width to near the
minimum, 26 columns, the graph_width value becomes negative. Consequently, the
graph part of diff-stat is not resized properly.
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
---
t/t4052-stat-output.sh | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
index d748e5e..b8eec8f 100755
--- a/t/t4052-stat-output.sh
+++ b/t/t4052-stat-output.sh
@@ -284,6 +284,34 @@ respects expect200 show --stat
respects expect200 log -1 --stat
EOF
+cat >expect1 <<'EOF'
+ ...aaaaaaa | 1000 ++++++
+EOF
+cat >expect1-graph <<'EOF'
+| ...aaaaaaa | 1000 ++++++
+EOF
+while read teststate verb expect cmd args
+do
+ test_expect_$teststate "$cmd $verb prefix greater than COLUMNS (big change)" '
+ COLUMNS=1 git $cmd $args >output
+ grep " | " output >actual &&
+ test_cmp "$expect" actual
+ '
+
+ test "$cmd" != diff || continue
+
+ test_expect_$teststate "$cmd --graph $verb prefix greater than COLUMNS (big change)" '
+ COLUMNS=1 git $cmd $args --graph >output
+ grep " | " output >actual &&
+ test_cmp "$expect-graph" actual
+ '
+done <<\EOF
+success ignores expect80 format-patch -1 --stdout
+failure respects expect1 diff HEAD^ HEAD --stat
+failure respects expect1 show --stat
+failure respects expect1 log -1 --stat
+EOF
+
cat >expect <<'EOF'
abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EOF
--
1.7.3.4
next prev parent reply other threads:[~2012-04-18 21:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 2:29 [PATCH v4 1/4] t4052: test --stat output with --graph Lucian Poston
2012-04-18 2:29 ` [PATCH v4 2/4] Adjust stat width calculations to take --graph output into account Lucian Poston
2012-04-18 2:29 ` [PATCH v4 3/4] t4052: Test diff-stat output with minimum columns Lucian Poston
2012-04-18 20:15 ` Junio C Hamano
2012-04-18 21:19 ` Lucian Poston
2012-04-18 21:09 ` Lucian Poston [this message]
2012-04-26 22:34 ` Kacper Kornet
2012-04-27 9:25 ` [PATCH] test: skip test with COLUMNS=1 under mksh Zbigniew Jędrzejewski-Szmek
2012-04-27 16:08 ` Junio C Hamano
2012-04-28 11:09 ` Zbigniew Jędrzejewski-Szmek
2012-04-27 16:21 ` Junio C Hamano
2012-04-27 22:35 ` Stefano Lattarini
2012-04-28 11:09 ` Zbigniew Jędrzejewski-Szmek
2012-04-29 21:28 ` Junio C Hamano
2012-04-18 2:29 ` [PATCH v4 4/4] Prevent graph_width of stat width from falling below min Lucian Poston
2012-04-18 21:12 ` Lucian Poston
2012-04-18 8:47 ` [PATCH v4 1/4] t4052: test --stat output with --graph Zbigniew Jędrzejewski-Szmek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334783377-31229-1-git-send-email-lucian.poston@gmail.com \
--to=lucian.poston@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=zbyszek@in.waw.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).