git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Nov 19, 2009, 18:41 UTC
Message-ID
<4B059150.5050303@ramsay1.demon.co.uk>

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(-)
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
Next: Nanako Shiraishi
Message 1 of 5 in “t9700-perl-git.sh: Fix a test failure on Cygwin”
  1. t9700-perl-git.sh: Fix a test failure on CygwinRamsay Jones, Nov 19, 2009
  2. Nanako ShiraishiDec 30, 2009
  3. Junio C HamanoDec 31, 2009
  4. Nanako ShiraishiJan 1, 2010
  5. Junio C HamanoJan 1, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.