Skip to content

Commit

Permalink
test prerequisites: enumerate with commas
Browse files Browse the repository at this point in the history
test_have_prereq does understand multiple predicates given as
separate arguments, but that is by accident.  We should list the
prerequisites just like we use them as the (first) optional
parameter for test_expect_success, concatenated with commas, for
consistency.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jul 21, 2014
1 parent f57a871 commit b056222
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions t/t9809-git-p4-client-view.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ test_expect_success 'wildcard files submit back to p4, client-spec case' '
(
cd "$git" &&
echo git-wild-hash >dir1/git-wild#hash &&
if test_have_prereq !MINGW !CYGWIN
if test_have_prereq !MINGW,!CYGWIN
then
echo git-wild-star >dir1/git-wild\*star
fi &&
Expand All @@ -379,7 +379,7 @@ test_expect_success 'wildcard files submit back to p4, client-spec case' '
(
cd "$cli" &&
test_path_is_file dir1/git-wild#hash &&
if test_have_prereq !MINGW !CYGWIN
if test_have_prereq !MINGW,!CYGWIN
then
test_path_is_file dir1/git-wild\*star
fi &&
Expand Down
14 changes: 7 additions & 7 deletions t/t9812-git-p4-wildcards.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test_expect_success 'add p4 files with wildcards in the names' '
printf "file2\nhas\nsome\nrandom\ntext\n" >file2 &&
p4 add file2 &&
echo file-wild-hash >file-wild#hash &&
if test_have_prereq !MINGW !CYGWIN
if test_have_prereq !MINGW,!CYGWIN
then
echo file-wild-star >file-wild\*star
fi &&
Expand All @@ -31,7 +31,7 @@ test_expect_success 'wildcard files git p4 clone' '
(
cd "$git" &&
test -f file-wild#hash &&
if test_have_prereq !MINGW !CYGWIN
if test_have_prereq !MINGW,!CYGWIN
then
test -f file-wild\*star
fi &&
Expand All @@ -46,7 +46,7 @@ test_expect_success 'wildcard files submit back to p4, add' '
(
cd "$git" &&
echo git-wild-hash >git-wild#hash &&
if test_have_prereq !MINGW !CYGWIN
if test_have_prereq !MINGW,!CYGWIN
then
echo git-wild-star >git-wild\*star
fi &&
Expand All @@ -60,7 +60,7 @@ test_expect_success 'wildcard files submit back to p4, add' '
(
cd "$cli" &&
test_path_is_file git-wild#hash &&
if test_have_prereq !MINGW !CYGWIN
if test_have_prereq !MINGW,!CYGWIN
then
test_path_is_file git-wild\*star
fi &&
Expand All @@ -75,7 +75,7 @@ test_expect_success 'wildcard files submit back to p4, modify' '
(
cd "$git" &&
echo new-line >>git-wild#hash &&
if test_have_prereq !MINGW !CYGWIN
if test_have_prereq !MINGW,!CYGWIN
then
echo new-line >>git-wild\*star
fi &&
Expand All @@ -89,7 +89,7 @@ test_expect_success 'wildcard files submit back to p4, modify' '
(
cd "$cli" &&
test_line_count = 2 git-wild#hash &&
if test_have_prereq !MINGW !CYGWIN
if test_have_prereq !MINGW,!CYGWIN
then
test_line_count = 2 git-wild\*star
fi &&
Expand Down Expand Up @@ -152,7 +152,7 @@ test_expect_success 'wildcard files submit back to p4, delete' '
(
cd "$cli" &&
test_path_is_missing git-wild#hash &&
if test_have_prereq !MINGW !CYGWIN
if test_have_prereq !MINGW,!CYGWIN
then
test_path_is_missing git-wild\*star
fi &&
Expand Down

0 comments on commit b056222

Please sign in to comment.