diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-03-07 13:48:59 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-07 13:27:40 -0800 |
commit | 53ce7ccff11e9cbc55f7cd7a754df7fde54dbcc8 (patch) | |
tree | b53ea87e05ccd987ec1e194656065e9886e27c40 /t/t1503-rev-parse-verify.sh | |
parent | merge tests: use "test_must_fail" instead of ad-hoc pattern (diff) | |
download | tgif-53ce7ccff11e9cbc55f7cd7a754df7fde54dbcc8.tar.xz |
rev-parse tests: don't ignore "git reflog" exit code
Amend a test added in 9c46c054ae4 (rev-parse: tests git rev-parse
--verify master@{n}, for various n, 2010-08-24) so that we'll stop
ignoring the exit code of "git reflog" by having it on the
left-hand-side of a pipe.
Because of this I'd marked this test as passing under SANITIZE=leak in
f442c94638d (leak tests: mark some rev-parse tests as passing with
SANITIZE=leak, 2021-10-31). As all of it except this specific test
will now pass, let's skip it under the !SANITIZE_LEAK prerequisite.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1503-rev-parse-verify.sh')
-rwxr-xr-x | t/t1503-rev-parse-verify.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh index 94fe413ee3..ba43168d12 100755 --- a/t/t1503-rev-parse-verify.sh +++ b/t/t1503-rev-parse-verify.sh @@ -132,8 +132,9 @@ test_expect_success 'use --default' ' test_must_fail git rev-parse --verify --default bar ' -test_expect_success 'main@{n} for various n' ' - N=$(git reflog | wc -l) && +test_expect_success !SANITIZE_LEAK 'main@{n} for various n' ' + git reflog >out && + N=$(wc -l <out) && Nm1=$(($N-1)) && Np1=$(($N+1)) && git rev-parse --verify main@{0} && |