Merge branch 'dl/test-must-fail-fixes-4'
Test clean-up. * dl/test-must-fail-fixes-4: t9819: don't use test_must_fail with p4 t9164: use test_must_fail only on git commands t9160: use test_path_is_missing() t9141: use test_path_is_missing() t7508: don't use `test_must_fail test_cmp` t7408: replace incorrect uses of test_must_fail t6030: use test_path_is_missing()
This commit is contained in:
@ -148,7 +148,7 @@ test_expect_success 'bisect start: no ".git/BISECT_START" created if junk rev' '
|
|||||||
test_must_fail git bisect start $HASH4 foo -- &&
|
test_must_fail git bisect start $HASH4 foo -- &&
|
||||||
git branch > branch.output &&
|
git branch > branch.output &&
|
||||||
grep "* other" branch.output > /dev/null &&
|
grep "* other" branch.output > /dev/null &&
|
||||||
test_must_fail test -e .git/BISECT_START
|
test_path_is_missing .git/BISECT_START
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'bisect start: existing ".git/BISECT_START" not modified if junk rev' '
|
test_expect_success 'bisect start: existing ".git/BISECT_START" not modified if junk rev' '
|
||||||
@ -166,7 +166,7 @@ test_expect_success 'bisect start: no ".git/BISECT_START" if mistaken rev' '
|
|||||||
test_must_fail git bisect start $HASH1 $HASH4 -- &&
|
test_must_fail git bisect start $HASH1 $HASH4 -- &&
|
||||||
git branch > branch.output &&
|
git branch > branch.output &&
|
||||||
grep "* other" branch.output > /dev/null &&
|
grep "* other" branch.output > /dev/null &&
|
||||||
test_must_fail test -e .git/BISECT_START
|
test_path_is_missing .git/BISECT_START
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'bisect start: no ".git/BISECT_START" if checkout error' '
|
test_expect_success 'bisect start: no ".git/BISECT_START" if checkout error' '
|
||||||
@ -175,7 +175,7 @@ test_expect_success 'bisect start: no ".git/BISECT_START" if checkout error' '
|
|||||||
git branch &&
|
git branch &&
|
||||||
git branch > branch.output &&
|
git branch > branch.output &&
|
||||||
grep "* other" branch.output > /dev/null &&
|
grep "* other" branch.output > /dev/null &&
|
||||||
test_must_fail test -e .git/BISECT_START &&
|
test_path_is_missing .git/BISECT_START &&
|
||||||
test -z "$(git for-each-ref "refs/bisect/*")" &&
|
test -z "$(git for-each-ref "refs/bisect/*")" &&
|
||||||
git checkout HEAD hello
|
git checkout HEAD hello
|
||||||
'
|
'
|
||||||
@ -485,7 +485,7 @@ test_expect_success 'optimized merge base checks' '
|
|||||||
git bisect bad &&
|
git bisect bad &&
|
||||||
git bisect good "$A_HASH" > my_bisect_log4.txt &&
|
git bisect good "$A_HASH" > my_bisect_log4.txt &&
|
||||||
test_i18ngrep "merge base must be tested" my_bisect_log4.txt &&
|
test_i18ngrep "merge base must be tested" my_bisect_log4.txt &&
|
||||||
test_must_fail test -f ".git/BISECT_ANCESTORS_OK"
|
test_path_is_missing ".git/BISECT_ANCESTORS_OK"
|
||||||
'
|
'
|
||||||
|
|
||||||
# This creates another side branch called "parallel" with some files
|
# This creates another side branch called "parallel" with some files
|
||||||
|
@ -122,8 +122,8 @@ test_expect_success 'missing submodule alternate fails clone and submodule updat
|
|||||||
# update of the submodule succeeds
|
# update of the submodule succeeds
|
||||||
test_must_fail git submodule update --init &&
|
test_must_fail git submodule update --init &&
|
||||||
# and we have no alternates:
|
# and we have no alternates:
|
||||||
test_must_fail test_alternate_is_used .git/modules/sub/objects/info/alternates sub &&
|
test_path_is_missing .git/modules/sub/objects/info/alternates &&
|
||||||
test_must_fail test_path_is_file sub/file1
|
test_path_is_missing sub/file1
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ test_expect_success 'ignoring missing submodule alternates passes clone and subm
|
|||||||
# update of the submodule succeeds
|
# update of the submodule succeeds
|
||||||
git submodule update --init &&
|
git submodule update --init &&
|
||||||
# and we have no alternates:
|
# and we have no alternates:
|
||||||
test_must_fail test_alternate_is_used .git/modules/sub/objects/info/alternates sub &&
|
test_path_is_missing .git/modules/sub/objects/info/alternates &&
|
||||||
test_path_is_file sub/file1
|
test_path_is_file sub/file1
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
@ -182,7 +182,7 @@ check_that_two_of_three_alternates_are_used() {
|
|||||||
# immediate submodule has alternate:
|
# immediate submodule has alternate:
|
||||||
test_alternate_is_used .git/modules/subwithsub/objects/info/alternates subwithsub &&
|
test_alternate_is_used .git/modules/subwithsub/objects/info/alternates subwithsub &&
|
||||||
# but nested submodule has no alternate:
|
# but nested submodule has no alternate:
|
||||||
test_must_fail test_alternate_is_used .git/modules/subwithsub/modules/sub/objects/info/alternates subwithsub/sub
|
test_path_is_missing .git/modules/subwithsub/modules/sub/objects/info/alternates
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1471,7 +1471,7 @@ test_expect_success '"status.branch=true" same as "-b"' '
|
|||||||
test_expect_success '"status.branch=true" different from "--no-branch"' '
|
test_expect_success '"status.branch=true" different from "--no-branch"' '
|
||||||
git status -s --no-branch >expected_nobranch &&
|
git status -s --no-branch >expected_nobranch &&
|
||||||
git -c status.branch=true status -s >actual &&
|
git -c status.branch=true status -s >actual &&
|
||||||
test_must_fail test_cmp expected_nobranch actual
|
! test_cmp expected_nobranch actual
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success '"status.branch=true" weaker than "--no-branch"' '
|
test_expect_success '"status.branch=true" weaker than "--no-branch"' '
|
||||||
|
@ -90,10 +90,10 @@ test_expect_success 'Multiple branch or tag paths require -d' '
|
|||||||
) &&
|
) &&
|
||||||
( cd svn_project &&
|
( cd svn_project &&
|
||||||
svn_cmd up &&
|
svn_cmd up &&
|
||||||
test_must_fail test -d b_one/Nope &&
|
test_path_is_missing b_one/Nope &&
|
||||||
test_must_fail test -d b_two/Nope &&
|
test_path_is_missing b_two/Nope &&
|
||||||
test_must_fail test -d tags_A/Tagless &&
|
test_path_is_missing tags_A/Tagless &&
|
||||||
test_must_fail test -d tags_B/Tagless
|
test_path_is_missing tags_B/Tagless
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -86,8 +86,8 @@ test_expect_success 'remove non-last entry from directory' '
|
|||||||
cd "$GIT_REPO" &&
|
cd "$GIT_REPO" &&
|
||||||
git checkout HEAD~2
|
git checkout HEAD~2
|
||||||
) &&
|
) &&
|
||||||
test_must_fail test -f "$GIT_REPO"/2/.gitignore &&
|
test_path_is_missing "$GIT_REPO"/2/.gitignore &&
|
||||||
test_must_fail test -f "$GIT_REPO"/3/.gitignore
|
test_path_is_missing "$GIT_REPO"/3/.gitignore
|
||||||
'
|
'
|
||||||
|
|
||||||
# After re-cloning the repository with --placeholder-file specified, there
|
# After re-cloning the repository with --placeholder-file specified, there
|
||||||
|
@ -92,7 +92,7 @@ test_expect_success 'check if post-commit hook creates a concurrent commit' '
|
|||||||
echo 1 >> file &&
|
echo 1 >> file &&
|
||||||
svn_cmd commit -m "changing file" &&
|
svn_cmd commit -m "changing file" &&
|
||||||
svn_cmd up &&
|
svn_cmd up &&
|
||||||
test_must_fail test_cmp auto_updated_file au_file_saved
|
! test_cmp auto_updated_file au_file_saved
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ test_expect_success 'check if pre-commit hook fails' '
|
|||||||
echo 2 >> file &&
|
echo 2 >> file &&
|
||||||
svn_cmd commit -m "changing file once again" &&
|
svn_cmd commit -m "changing file once again" &&
|
||||||
echo 3 >> file &&
|
echo 3 >> file &&
|
||||||
test_must_fail svn_cmd commit -m "this commit should fail" &&
|
! svn_cmd commit -m "this commit should fail" &&
|
||||||
svn_cmd revert file
|
svn_cmd revert file
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
@ -30,7 +30,7 @@ test_expect_success 'Check p4 is in case-folding mode' '
|
|||||||
cd "$cli" &&
|
cd "$cli" &&
|
||||||
>lc/FILE.TXT &&
|
>lc/FILE.TXT &&
|
||||||
p4 add lc/FILE.TXT &&
|
p4 add lc/FILE.TXT &&
|
||||||
test_must_fail p4 submit -d "Cannot add file differing only in case" lc/FILE.TXT
|
! p4 submit -d "Cannot add file differing only in case" lc/FILE.TXT
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user