Skip to contentSkip to conversation

Skip t1300.70 and 71 on msysGit.

PATCH In review Pat Thoyts 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore

Pat Thoyts

author
#0 lore raw

PATCH 1/1 Skip t1300.70 and 71 on msysGit.

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.

---
 t/t1300-repo-config.sh |    6 +++---
 t/test-lib.sh          |    1 +
 2 files changed, 4 insertions(+), 3 deletions(-)
t/t1300-repo-config.sh +3 -3
index f11f98c..90541a3 100755
@@ -701,7 +701,7 @@ cat >expect <<\EOF
 	trailingtilde = foo~
 EOF
 
-test_expect_success 'set --path' '
+test_expect_success NONMINGW 'set --path' '
 	git config --path path.home "~/" &&
 	git config --path path.normal "/dev/null" &&
 	git config --path path.trailingtilde "foo~" &&
@@ -713,14 +713,14 @@ $HOME/
 foo~
 EOF
 
-test_expect_success 'get --path' '
+test_expect_success NONMINGW 'get --path' '
 	git config --get --path path.home > result &&
 	git config --get --path path.normal >> result &&
 	git config --get --path path.trailingtilde >> result &&
 	test_cmp expect result
 '
 
-rm .git/config
+test_have_prereq NONMINGW && rm .git/config
 
 git config quote.leading " test"
 git config quote.ending "test "
t/test-lib.sh +1 -0
index afd3053..f6a1590 100644
@@ -776,6 +776,7 @@ case $(uname -s) in
 	test_set_prereq POSIXPERM
 	test_set_prereq BSLASHPSPEC
 	test_set_prereq EXECKEEPSPID
+	test_set_prereq NONMINGW
 	;;
 esac
 
Signature · 1 line
1.7.0.rc2.1438.gebbe6.dirty
#1 lore raw

Hi Pat,

Quoted 9 lines · Pat Thoyts

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.

---

Can you push this to 4msysgit's 'devel' branch?

Thank you,
Dscho