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

Subsystems: the rest

STALE3729d

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Ramsay Jones <hidden>
Date: 2016-06-15 22:47:44

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.

Signed-off-by: Ramsay Jones <redacted>
---
 t/t9700/test.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t9700/test.pl b/t/t9700/test.pl
index 6c70aec..666722d 100755
--- a/t/t9700/test.pl
+++ b/t/t9700/test.pl
@@ -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
-- 
1.6.5

Re: [PATCH] t9700-perl-git.sh: Fix a test failure on Cygwin

From: Nanako Shiraishi <hidden>
Date: 2016-06-15 22:47:57

Junio, could you tell us what happened to this thread?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help