Skip to contentSkip to conversation

t9700-perl-git.sh: Fix a test failure on Cygwin

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 t9700-perl-git.sh: Fix a test failure on Cygwin

The t/t9700/test.pl script uses method invocation syntax when using the Cwd module to determine the current working directory. This fails on cygwin, since cygwin perl specifically checks for any arguments to the cwd() function and croak()'s with the message "Usage: Cwd::cwd()". (In perl v5.8.8 distribution, see the file perl-5.8.8/cygwin/cygwin.c lines 139-157)

In order to avoid the problem, we replace the method invocation syntax with a simple function call.

---
 t/t9700/test.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
t/t9700/test.pl +1 -1
index 6c70aec..666722d 100755
@@ -13,7 +13,7 @@ use File::Basename;
 BEGIN { use_ok('Git') }
 
 # set up
-our $abs_repo_dir = Cwd->cwd;
+our $abs_repo_dir = cwd();
 ok(our $r = Git->repository(Directory => "."), "open repository");
 
 # config
Signature · 1 line
1.6.5
#2 lore raw
Quoted 1 line · Nanako Shiraishi

Junio, could you tell us what happened to this thread?

Hmph, I think we have it as 81f4026 (t9700-perl-git.sh: Fix a test failure on Cygwin, 2009-11-19).

#3 lore raw

Quoting Junio C Hamano <[email protected]>

Quoted 6 lines
Quoted 1 line · Nanako Shiraishi

Junio, could you tell us what happened to this thread?

Hmph, I think we have it as 81f4026 (t9700-perl-git.sh: Fix a test failure on Cygwin, 2009-11-19).

Oh, my mistake. I'm very sorry for wasting your time.

Signature · 2 lines
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
#4 lore raw
Quoted 10 lines · Nanako Shiraishi

Quoting Junio C Hamano <[email protected]>

Quoted 6 lines
Quoted 1 line · Nanako Shiraishi

Junio, could you tell us what happened to this thread?

Hmph, I think we have it as 81f4026 (t9700-perl-git.sh: Fix a test failure on Cygwin, 2009-11-19).

Oh, my mistake. I'm very sorry for wasting your time.

That's Ok; your other reminders were all good ones and greatly appreciated.

But let me slow down. I'll reply to the other messages next year ;-).