Skip to content

Commit

Permalink
t9700-perl-git.sh: Fix a test failure on Cygwin
Browse files Browse the repository at this point in the history
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 <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ramsay Jones authored and Junio C Hamano committed Nov 20, 2009
1 parent 78d553b commit 81f4026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t9700/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
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
Expand Down

0 comments on commit 81f4026

Please sign in to comment.