Merge branch 'jk/test-chain-lint'
authorJunio C Hamano <gitster@pobox.com>
Thu, 26 Mar 2015 18:57:13 +0000 (11:57 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 Mar 2015 18:57:14 +0000 (11:57 -0700)
People often forget to chain the commands in their test together
with &&, leaving a failure from an earlier command in the test go
unnoticed. The new GIT_TEST_CHAIN_LINT mechanism allows you to
catch such a mistake more easily.

* jk/test-chain-lint: (36 commits)
t9001: drop save_confirm helper
t0020: use test_* helpers instead of hand-rolled messages
t: simplify loop exit-code status variables
t: fix some trivial cases of ignored exit codes in loops
t7701: fix ignored exit code inside loop
t3305: fix ignored exit code inside loop
t0020: fix ignored exit code inside loops
perf-lib: fix ignored exit code inside loop
t6039: fix broken && chain
t9158, t9161: fix broken &&-chain in git-svn tests
t9104: fix test for following larger parents
t4104: drop hand-rolled error reporting
t0005: fix broken &&-chains
t7004: fix embedded single-quotes
t0050: appease --chain-lint
t9001: use test_when_finished
t4117: use modern test_* helpers
t6034: use modern test_* helpers
t1301: use modern test_* helpers
t0020: use modern test_* helpers
...

1  2 
t/t1700-split-index.sh
t/t4052-stat-output.sh
t/t4202-log.sh
t/t5541-http-push-smart.sh
t/t5551-http-fetch-smart.sh
t/t6000-rev-list-misc.sh
t/t7004-tag.sh
t/t7510-signed-commit.sh
t/t9903-bash-prompt.sh
t/test-lib.sh
Simple merge
index babd2ead88182e7b212486d0ae753f51d5deac76,4a02b17fc8528975b7dc626e153903f67a583da7..9f563db20a867156a825dfc0ce810c4f59109ac8
@@@ -99,10 -99,10 +99,10 @@@ d
                test_cmp "$expect" actual
        '
  
 -      test "$cmd" != diff || continue
 +      case "$cmd" in diff|show) continue;; esac
  
        test_expect_success "$cmd --graph $verb COLUMNS (big change)" '
-               COLUMNS=200 git $cmd $args --graph >output
+               COLUMNS=200 git $cmd $args --graph >output &&
                grep " | " output >actual &&
                test_cmp "$expect-graph" actual
        '
                test_cmp "$expect" actual
        '
  
 -      test "$cmd" != diff || continue
 +      case "$cmd" in diff|show) continue;; esac
  
        test_expect_success "$cmd --graph $verb not enough COLUMNS (big change)" '
-               COLUMNS=40 git $cmd $args --graph >output
+               COLUMNS=40 git $cmd $args --graph >output &&
                grep " | " output >actual &&
                test_cmp "$expect-graph" actual
        '
                test_cmp "$expect" actual
        '
  
 -      test "$cmd" != diff || continue
 +      case "$cmd" in diff|show) continue;; esac
  
        test_expect_success "$cmd --graph $verb statGraphWidth config" '
-               git -c diff.statGraphWidth=26 $cmd $args --graph >output
+               git -c diff.statGraphWidth=26 $cmd $args --graph >output &&
                grep " | " output >actual &&
                test_cmp "$expect-graph" actual
        '
                test_cmp expect actual
        '
  
 -      test "$cmd" != diff || continue
 +      case "$cmd" in diff|show) continue;; esac
  
        test_expect_success "$cmd --stat-width=width --graph with big change" '
-               git $cmd $args --stat-width=40 --graph >output
+               git $cmd $args --stat-width=40 --graph >output &&
                grep " | " output >actual &&
                test_cmp expect-graph actual
        '
                test_cmp "$expect" actual
        '
  
 -      test "$cmd" != diff || continue
 +      case "$cmd" in diff|show) continue;; esac
  
        test_expect_success "$cmd --graph $verb COLUMNS (long filename)" '
-               COLUMNS=200 git $cmd $args --graph >output
+               COLUMNS=200 git $cmd $args --graph >output &&
                grep " | " output >actual &&
                test_cmp "$expect-graph" actual
        '
diff --cc t/t4202-log.sh
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc t/t7004-tag.sh
Simple merge
Simple merge
Simple merge
diff --cc t/test-lib.sh
Simple merge