while read cmd args
do
cat >expect <<-'EOF'
- ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
EOF
test_expect_success "$cmd: small change with long name gives more space to the name" '
git $cmd $args >output &&
'
cat >expect <<-'EOF'
- ...aaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
EOF
test_expect_success "$cmd --stat=width: a long name is given more room when the bar is short" '
git $cmd $args --stat=40 >output &&
'
cat >expect <<-'EOF'
- ...aaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
EOF
test_expect_success "$cmd --stat=...,name-width with long name" '
git $cmd $args --stat=60,30 >output &&
cat >expect1-graph <<'EOF'
| ...aaaaaaa | 1000 ++++++
EOF
-while read teststate verb expect cmd args
+while read verb expect cmd args
do
- test_expect_$teststate "$cmd $verb prefix greater than COLUMNS (big change)" '
+ test_expect_success COLUMNS_CAN_BE_1 \
+ "$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)" '
+ test_expect_success COLUMNS_CAN_BE_1 \
+ "$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
+ignores expect80 format-patch -1 --stdout
+respects expect1 diff HEAD^ HEAD --stat
+respects expect1 show --stat
+respects expect1 log -1 --stat
EOF
cat >expect <<'EOF'