]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ab/tests-various-fixup'
authorJunio C Hamano <gitster@pobox.com>
Fri, 12 Feb 2021 22:21:04 +0000 (14:21 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Feb 2021 22:21:04 +0000 (14:21 -0800)
Various test updates.

* ab/tests-various-fixup:
  rm tests: actually test for SIGPIPE in SIGPIPE test
  archive tests: use a cheaper "zipinfo -h" invocation to get header
  upload-pack tests: avoid a non-zero "grep" exit status
  git-svn tests: rewrite brittle tests to use "--[no-]merges".
  git svn mergeinfo tests: refactor "test -z" to use test_must_be_empty
  git svn mergeinfo tests: modernize redirection & quoting style
  cache-tree tests: explicitly test HEAD and index differences
  cache-tree tests: use a sub-shell with less indirection
  cache-tree tests: remove unused $2 parameter
  cache-tree tests: refactor for modern test style

1  2 
t/t3600-rm.sh
t/t5703-upload-pack-ref-in-want.sh
t/t9151-svn-mergeinfo.sh

diff --cc t/t3600-rm.sh
Simple merge
Simple merge
index 696ace2462559eb8bfa336db762923c449914db2,c33bae91fb05f7cc1dff4d0f3361e2e4bff993c6..1fbe84feb1689cc413725f49189bcdd7f1379139
@@@ -48,13 -42,13 +45,13 @@@ test_expect_success 'merging two branch
        f1_commit=$(git rev-list --all --grep="make f1 branch from trunk") &&
        f2_commit=$(git rev-list --all --grep="make f2 branch from trunk") &&
        merge_commit=$(git rev-list --all --grep="Merge f1 and f2 to trunk") &&
-       not_reachable=$(git rev-list -1 $f1_commit $f2_commit --not $merge_commit) &&
-       [ -z "$not_reachable" ]
      '
+       git rev-list -1 $f1_commit $f2_commit --not $merge_commit >not-reachable &&
+       test_must_be_empty not-reachable
+ '
  
  test_expect_failure 'everything got merged in the end' '
-       unmerged=$(git rev-list --all --not main) &&
-       [ -z "$unmerged" ]
-       '
 -      git rev-list --all --not master >unmerged &&
++      git rev-list --all --not main >unmerged &&
+       test_must_be_empty unmerged
+ '
  
  test_done