X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5710-info-alternate.sh;h=910ccb4fff561360ba7060ab8df71c0349c4207a;hb=319a36a5c2da8dd07993caac43b7820bff3b0d37;hp=699df6ebd8b6e76f95b255783c892de23610e504;hpb=a6954452ecf757523b31d6eaaf7e00c7a2d91e46;p=git.git diff --git a/t/t5710-info-alternate.sh b/t/t5710-info-alternate.sh index 699df6ebd..910ccb4ff 100755 --- a/t/t5710-info-alternate.sh +++ b/t/t5710-info-alternate.sh @@ -53,14 +53,18 @@ git prune' cd "$base_dir" -test_expect_failure 'creating too deep nesting' \ +test_expect_success 'creating too deep nesting' \ 'git clone -l -s C D && git clone -l -s D E && git clone -l -s E F && git clone -l -s F G && -git clone -l -s G H && -cd H && -test_valid_repo' +git clone -l -s G H' + +test_expect_success 'invalidity of deepest repository' \ +'cd H && { + test_valid_repo + test $? -ne 0 +}' cd "$base_dir" @@ -83,10 +87,10 @@ test_valid_repo" cd "$base_dir" -test_expect_failure 'that info/alternates is necessary' \ +test_expect_success 'that info/alternates is necessary' \ 'cd C && -rm .git/objects/info/alternates && -test_valid_repo' +rm -f .git/objects/info/alternates && +! (test_valid_repo)' cd "$base_dir" @@ -97,9 +101,11 @@ test_valid_repo' cd "$base_dir" -test_expect_failure 'that relative alternate is only possible for current dir' \ -'cd D && -test_valid_repo' +test_expect_success \ + 'that relative alternate is only possible for current dir' ' + cd D && + ! (test_valid_repo) +' cd "$base_dir"