diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-03-16 17:53:09 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-03-16 17:53:09 -0700 |
| commit | ea05fd5fbf7c28200de22cf06efee3a987dc1244 (patch) | |
| tree | 17e40fd7de2ebd46e7c9637950a0317bae0bd32c /t/t4027-diff-submodule.sh | |
| parent | 0b01c0a814e9646dd646c8f387d6c9bfdc5baa97 (diff) | |
| parent | a6ecc256c34c42a8b9f1790d9bfb5ea8f6309022 (diff) | |
| download | git-ea05fd5fbf7c28200de22cf06efee3a987dc1244.tar.xz | |
Merge branch 'ab/keep-git-exit-codes-in-tests'
Updates tests around the use of "test $(git cmd) = constant".
* ab/keep-git-exit-codes-in-tests:
rev-list simplify tests: don't ignore "git" exit code
checkout tests: don't ignore "git <cmd>" exit code
apply tests: don't ignore "git ls-files" exit code, drop sub-shell
gettext tests: don't ignore "test-tool regex" exit code
rev-list tests: don't hide abort() in "test_expect_failure"
diff tests: don't ignore "git rev-list" exit code
notes tests: don't ignore "git" exit code
rev-parse tests: don't ignore "git reflog" exit code
merge tests: use "test_must_fail" instead of ad-hoc pattern
apply tests: use "test_must_fail" instead of ad-hoc pattern
diff tests: don't ignore "git diff" exit code in "read" loop
diff tests: don't ignore "git diff" exit code
read-tree tests: check "diff-files" exit code on failure
tests: use "test_stdout_line_count", not "test $(git [...] | wc -l)"
tests: change some 'test $(git) = "x"' to test_cmp
Diffstat (limited to 't/t4027-diff-submodule.sh')
| -rwxr-xr-x | t/t4027-diff-submodule.sh | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/t/t4027-diff-submodule.sh b/t/t4027-diff-submodule.sh index 6cef0da982..295da987cc 100755 --- a/t/t4027-diff-submodule.sh +++ b/t/t4027-diff-submodule.sh @@ -2,7 +2,6 @@ test_description='difference in submodules' -TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh . "$TEST_DIRECTORY"/lib-diff.sh @@ -28,10 +27,8 @@ test_expect_success setup ' git commit -m "submodule #2" ) && - set x $( - cd sub && - git rev-list HEAD - ) && + git -C sub rev-list HEAD >revs && + set x $(cat revs) && echo ":160000 160000 $3 $ZERO_OID M sub" >expect && subtip=$3 subprev=$2 ' |
