threads / patch / 21669

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

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

## tl;dr

5 messages between Nov 19, 2009 and Jan 1, 2010. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Ramsay Jones· Nov 19, 2009, 18:41 UTC · lore

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>
---
 t/t9700/test.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to t/t9700/test.pl +1 −1
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
Junio C Hamano· Dec 31, 2009, 06:49 UTC · re: Nanako Shiraishi · lore

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

Nanako Shiraishi <nanako3@lavabit.com> writes:
> 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).

Nanako Shiraishi· Jan 1, 2010, 00:05 UTC · re: Junio C Hamano · lore

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

Quoting Junio C Hamano <gitster@pobox.com>
Show 6 quoted lines
> Nanako Shiraishi <nanako3@lavabit.com> writes:
>
>> 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.
-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
Junio C Hamano· Jan 1, 2010, 00:07 UTC · re: Nanako Shiraishi · lore

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

Nanako Shiraishi <nanako3@lavabit.com> writes:
Show 10 quoted lines
> Quoting Junio C Hamano <gitster@pobox.com>
>
>> Nanako Shiraishi <nanako3@lavabit.com> writes:
>>
>>> 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 ;-).

← back to recent threads