Skip to contentSkip to conversation

t9501-*.sh: Fix a test failure on Cygwin

PATCH In review Ramsay Jones 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 6/14 t9501-*.sh: Fix a test failure on Cygwin

The first (setup) test attempts to create a file, using the test_commit function, called 'i can has snapshot?'. On cygwin (and MinGW) this fails with a "No such file or directory" error. In order to fix the tests, we simply remove the '?' wildcard from the name, since the purpose of these tests is not about creating funny filenames.

---
 t/t9501-gitweb-standalone-http-status.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
t/t9501-gitweb-standalone-http-status.sh +1 -1
index 2487da1..18825af 100755
@@ -16,7 +16,7 @@ code and message.'
 # snapshot settings
 
 test_expect_success 'setup' "
-	test_commit 'SnapshotTests' 'i can has snapshot?'
+	test_commit 'SnapshotTests' 'i can has snapshot'
 "
 
 
Signature · 1 line
1.7.3
Acked-by on v1 6/14
#1 lore raw
Quoted 9 lines · Ramsay Jones

The first (setup) test attempts to create a file, using the test_commit function, called 'i can has snapshot?'. On cygwin (and MinGW) this fails with a "No such file or directory" error. In order to fix the tests, we simply remove the '?' wildcard from the name, since the purpose of these tests is not about creating funny filenames.

All right.

BTW. if the test was about handling funny filenames (containing leading, embedded and trailing space, +&@=<>"' characters), what should we do instead?

Quoted 22 lines
---
 t/t9501-gitweb-standalone-http-status.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
t/t9501-gitweb-standalone-http-status.sh +1 -1
index 2487da1..18825af 100755
@@ -16,7 +16,7 @@ code and message.'
 # snapshot settings
 
 test_expect_success 'setup' "
-	test_commit 'SnapshotTests' 'i can has snapshot?'
+	test_commit 'SnapshotTests' 'i can has snapshot'
 "
 
 
Signature · 1 line
1.7.3
Signature · 2 lines
Jakub Narebski
Poland
#2 lore raw
Quoted 8 lines · Jakub Narebski
Quoted 7 lines · Ramsay Jones

The first (setup) test attempts to create a file, using the test_commit function, called 'i can has snapshot?'. On cygwin (and MinGW) this fails with a "No such file or directory" error. In order to fix the tests, we simply remove the '?' wildcard from the name, since the purpose of these tests is not about creating funny filenames.

Quoted 5 lines
Quoted 1 line

All right.

Thanks.

Quoted 3 lines

BTW. if the test was about handling funny filenames (containing leading, embedded and trailing space, +&@=<>"' characters), what should we do instead?

Hmm... dunno; take a look at t3600-rm.sh and t4135-apply-weird-filenames.sh for inspiration? ;-)

Just FYI the "illegal" pathname characters in windows include:

    < > : " / \ | ? *

along with control chars from 0 - 31.
Also, you can't have any trailing spaces or periods.

ATB,
Ramsay Jones