commit 0b47703514fc6cbbe5318d575bb1cce7152aadcb from: James Cook via: Thomas Adam date: Thu Jun 22 13:10:34 2023 UTC regress/cmdline: fix handling of unexpected success Diff from James Cook, thanks! commit - 88f0d95e71087c4bef372371863e49ee4ab16c95 commit + 0b47703514fc6cbbe5318d575bb1cce7152aadcb blob - eb1ede54ba534e112737b56c1fb19c02b9d70ddb blob + 69a9a2773510acc956e60ec5b87ae8aad43b8d8c --- regress/cmdline/commit.sh +++ regress/cmdline/commit.sh @@ -321,7 +321,7 @@ test_commit_rejects_conflicted_file() { ret=$? if [ $ret -eq 0 ]; then echo "got commit succeeded unexpectedly" - test_done "$testroot" "$ret" + test_done "$testroot" "1" return 1 fi @@ -1339,7 +1339,7 @@ test_commit_symlink() { ret=$? if [ $ret -eq 0 ]; then echo "got commit succeeded unexpectedly" >&2 - test_done "$testroot" "$ret" + test_done "$testroot" "1" return 1 fi echo -n "got: $testroot/wt/passwd.link: " > $testroot/stderr.expected @@ -1417,7 +1417,7 @@ test_commit_symlink() { ret=$? if [ $ret -eq 0 ]; then echo "got commit succeeded unexpectedly" >&2 - test_done "$testroot" "$ret" + test_done "$testroot" "1" return 1 fi echo -n "got: $testroot/wt/dotgotbar.link: " > $testroot/stderr.expected blob - 79f558cff6a61109fdd1089a30e941fcf382b49d blob + bdd7571df06f3c7d45127433eabfcdc76e0e94ed --- regress/cmdline/fetch.sh +++ regress/cmdline/fetch.sh @@ -1380,7 +1380,7 @@ test_fetch_delete_remote_refs() { ret=$? if [ $ret -eq 0 ]; then echo "got fetch command succeeded unexpectedly" >&2 - test_done "$testroot" "$ret" + test_done "$testroot" "1" return 1 fi blob - 6080151a8a3e5c278b52bd1288edfdf4aa4383fb blob + 2850c77ea9f07c4d604211acb189455b07692252 --- regress/cmdline/histedit.sh +++ regress/cmdline/histedit.sh @@ -1426,7 +1426,7 @@ test_histedit_duplicate_commit_in_script() { if [ $ret -eq 0 ]; then echo "histedit succeeded unexpectedly:" >&2 cat $testroot/stdout >&2 - test_done "$testroot" "$ret" + test_done "$testroot" 1 return 1 fi blob - a4561e55b71ef739aea26419efa37a02818e8885 blob + fea0fbd0c0b880d3f283fc17453e349290b0a480 --- regress/cmdline/integrate.sh +++ regress/cmdline/integrate.sh @@ -188,7 +188,7 @@ test_integrate_requires_rebase_first() { ret=$? if [ $ret -eq 0 ]; then echo "got integrate succeeded unexpectedly" - test_done "$testroot" "$ret" + test_done "$testroot" "1" return 1 fi @@ -529,7 +529,7 @@ test_integrate_into_nonbranch() { ret=$? if [ $ret -eq 0 ]; then echo "got integrate succeeded unexpectedly" - test_done "$testroot" "$ret" + test_done "$testroot" "1" return 1 fi blob - ca27e157f924c0abac516cda4f26581c04e3cc21 blob + 71e5e49a5b7f5ebee4e83f1e29b7b2352977c697 --- regress/cmdline/merge.sh +++ regress/cmdline/merge.sh @@ -88,7 +88,7 @@ test_merge_basic() { ret=$? if [ $ret -eq 0 ]; then echo "got merge succeeded unexpectedly" >&2 - test_done "$testroot" "$ret" + test_done "$testroot" "1" return 1 fi echo -n "got: work tree must be updated before it can be used " \ @@ -123,7 +123,7 @@ test_merge_basic() { ret=$? if [ $ret -eq 0 ]; then echo "got merge succeeded unexpectedly" >&2 - test_done "$testroot" "$ret" + test_done "$testroot" "1" return 1 fi echo -n "got: work tree contains files from multiple base commits; " \ @@ -160,7 +160,7 @@ test_merge_basic() { ret=$? if [ $ret -eq 0 ]; then echo "got merge succeeded unexpectedly" >&2 - test_done "$testroot" "$ret" + test_done "$testroot" "1" return 1 fi echo "got: alpha: file is staged" > $testroot/stderr.expected @@ -185,7 +185,7 @@ test_merge_basic() { ret=$? if [ $ret -eq 0 ]; then echo "got merge succeeded unexpectedly" >&2 - test_done "$testroot" "$ret" + test_done "$testroot" "1" return 1 fi echo -n "got: work tree contains local changes; " \ blob - 8c960baef8925da8232651df8d17bfdb3d9dc2cd blob + 76716f5e5237ac2f3426c566633ec858be31881e --- regress/cmdline/stage.sh +++ regress/cmdline/stage.sh @@ -2150,7 +2150,7 @@ test_stage_patch_removed_twice() { ret=$? if [ $ret -eq 0 ]; then echo "got stage command succeeded unexpectedly" >&2 - test_done "$testroot" "$ret" + test_done "$testroot" "1" return 1 fi