Skip to content

Commit

Permalink
Skip t1300.70 and 71 on msysGit.
Browse files Browse the repository at this point in the history
These two tests fail on msysGit because /dev/null is an alias for nul on
Windows and when reading the value back from git config the alias does
not match the real filename. Also the HOME environment variable has a
unix-style path but git returns a native equivalent path for '~'.  As
these are platform-dependent equivalent results it seems simplest to
skip the test entirely.

Moves the NOT_MINGW prereq from t5503 into the test library.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
  • Loading branch information
Pat Thoyts committed Oct 1, 2010
1 parent 4e57baf commit 3ba9ba8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 3 additions & 3 deletions t/t1300-repo-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -701,13 +701,13 @@ cat >expect <<\EOF
trailingtilde = foo~
EOF

test_expect_success 'set --path' '
test_expect_success NOT_MINGW 'set --path' '
git config --path path.home "~/" &&
git config --path path.normal "/dev/null" &&
git config --path path.trailingtilde "foo~" &&
test_cmp expect .git/config'

if test "${HOME+set}"
if test_have_prereq NOT_MINGW && test "${HOME+set}"
then
test_set_prereq HOMEVAR
fi
Expand All @@ -730,7 +730,7 @@ cat >expect <<\EOF
foo~
EOF

test_expect_success 'get --path copes with unset $HOME' '
test_expect_success NOT_MINGW 'get --path copes with unset $HOME' '
(
unset HOME;
test_must_fail git config --get --path path.home \
Expand Down
9 changes: 2 additions & 7 deletions t/t5503-tagfollow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ test_description='test automatic tag following'

. ./test-lib.sh

case $(uname -s) in
*MINGW*)
if !test_have_prereq NOT_MINGW; then
say "GIT_DEBUG_SEND_PACK not supported - skipping tests"
;;
*)
test_set_prereq NOT_MINGW
;;
esac
fi

# End state of the repository:
#
Expand Down
1 change: 1 addition & 0 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,7 @@ case $(uname -s) in
test_set_prereq POSIXPERM
test_set_prereq BSLASHPSPEC
test_set_prereq EXECKEEPSPID
test_set_prereq NOT_MINGW
;;
esac

Expand Down

0 comments on commit 3ba9ba8

Please sign in to comment.