diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2021-09-13 15:19:14 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-13 12:47:06 -0700 |
commit | 7390c65df4fa997563ee2d1f61acd6ebb9697eac (patch) | |
tree | 2b976b3a450db393606fe1dfeeb2f4a72e78eaa4 /t/t3407-rebase-abort.sh | |
parent | e505f452d4e7d0d4b603b1332ad742e74a5d5374 (diff) | |
download | git-7390c65df4fa997563ee2d1f61acd6ebb9697eac.tar.gz |
t3407: use test_cmp_rev
This provides better diagnostics if a test fails
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3407-rebase-abort.sh')
-rwxr-xr-x | t/t3407-rebase-abort.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/t/t3407-rebase-abort.sh b/t/t3407-rebase-abort.sh index 0ad21966bc..39076ac946 100755 --- a/t/t3407-rebase-abort.sh +++ b/t/t3407-rebase-abort.sh @@ -29,7 +29,7 @@ testrebase() { test_must_fail git rebase$type main && test_path_is_dir "$dotest" && git rebase --abort && - test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) && + test_cmp_rev to-rebase pre-rebase && test ! -d "$dotest" ' @@ -39,9 +39,9 @@ testrebase() { test_must_fail git rebase$type main && test_path_is_dir "$dotest" && test_must_fail git rebase --skip && - test $(git rev-parse HEAD) = $(git rev-parse main) && + test_cmp_rev HEAD main && git rebase --abort && - test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) && + test_cmp_rev to-rebase pre-rebase && test ! -d "$dotest" ' @@ -54,9 +54,9 @@ testrebase() { echo d >> a && git add a && test_must_fail git rebase --continue && - test $(git rev-parse HEAD) != $(git rev-parse main) && + test_cmp_rev ! HEAD main && git rebase --abort && - test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) && + test_cmp_rev to-rebase pre-rebase && test ! -d "$dotest" ' @@ -91,7 +91,7 @@ test_expect_success 'rebase --apply --quit' ' test_path_is_dir .git/rebase-apply && head_before=$(git rev-parse HEAD) && git rebase --quit && - test $(git rev-parse HEAD) = $head_before && + test_cmp_rev HEAD $head_before && test ! -d .git/rebase-apply ' @@ -102,7 +102,7 @@ test_expect_success 'rebase --merge --quit' ' test_path_is_dir .git/rebase-merge && head_before=$(git rev-parse HEAD) && git rebase --quit && - test $(git rev-parse HEAD) = $head_before && + test_cmp_rev HEAD $head_before && test ! -d .git/rebase-merge ' |