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

t9700-perl-git.sh is broken on some configurations

From
Christian Couder <christian.couder@gmail.com>
Date
Mar 4, 2016, 08:13 UTC
Message-ID
<CAP8UFD1z9H=SygaMVzpc__mXTbnFc2XiW0LZ+sfzdCPmrnXW6g@mail.gmail.com>
Hi,

It looks like t9700-perl-git.sh is broken on one machine I use but not on my laptop since commit d53c2c67380f769f91fd45cc8c63a5883245ccca (mingw: fix t9700's assumption about directory separators, Jan 27 17:19:56 2016).

I get:
------------------------
Initialized empty Git repository in /home/ccouder/git/git/t/trash
directory.t9700-perl-git/.git/
expecting success: echo "test file 1" > file1 &&
     echo "test file 2" > file2 &&
     mkdir directory1 &&
     echo "in directory1" >> directory1/file &&
     mkdir directory2 &&
     echo "in directory2" >> directory2/file &&
     git add . &&
     git commit -m "first commit" &&
     echo "new file in subdir 2" > directory2/file2 &&
     git add . &&
     git commit -m "commit in directory2" &&
     echo "changed file 1" > file1 &&
     git commit -a -m "second commit" &&
     git config --add color.test.slot1 green &&
     git config --add test.string value &&
     git config --add test.dupstring value1 &&
     git config --add test.dupstring value2 &&
     git config --add test.booltrue true &&
     git config --add test.boolfalse no &&
     git config --add test.boolother other &&
     git config --add test.int 2k &&
     git config --add test.path "~/foo" &&
     git config --add test.pathexpanded "$HOME/foo" &&
     git config --add test.pathmulti foo &&
     git config --add test.pathmulti bar
[master (root-commit) fc41470] first commit
 Author: A U Thor <author@example.com>
 4 files changed, 4 insertions(+)
 create mode 100644 directory1/file
 create mode 100644 directory2/file
 create mode 100644 file1
 create mode 100644 file2
[master 6a30dee] commit in directory2
 Author: A U Thor <author@example.com>
 1 file changed, 1 insertion(+)
 create mode 100644 directory2/file2
[master 33414b1] second commit
 Author: A U Thor <author@example.com>
 1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - set up test repository

# run 1: Perl API (perl /home/ccouder/git/git/t/t9700/test.pl) ok 2 - use Git; # test_external test Perl API failed: perl /home/ccouder/git/git/t/t9700/test.pl # expecting no stderr from previous command # test_external_without_stderr test no stderr: Perl API failed: perl /home/ccouder/git/git/t/t9700/test.pl: # Stderr is: Bareword found where operator expected at /home/ccouder/git/git/t/t9700/test.pl line 36, near "s/\\/\//gr" syntax error at /home/ccouder/git/git/t/t9700/test.pl line 36, near "s/\\/\//gr" Execution of /home/ccouder/git/git/t/t9700/test.pl aborted due to compilation errors. ------------------------

Indeed on the command line I get:

------------------------ $ t/t9700/test.pl ok 2 - use Git; Bareword found where operator expected at t/t9700/test.pl line 36, near "s/\\/\//gr" syntax error at t/t9700/test.pl line 36, near "s/\\/\//gr" Execution of t/t9700/test.pl aborted due to compilation errors. ------------------------

A quick look at t/t9700/test.pl line 36 was not enough for me to spot the problem.

Perl version is: perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux

The machine is running CentOS 6.5.

Thanks, Christian.

Next: Jeff King
Message 1 of 10 in “t9700-perl-git.sh is broken on some configurations”
  1. Christian CouderMar 4, 2016
  2. Jeff KingMar 4, 2016
  3. Christian CouderMar 4, 2016
  4. Jeff KingMar 4, 2016
  5. Dennis KaarsemakerMar 4, 2016
  6. t9700: fix test for perl older than 5.14Jeff King, Mar 4, 2016
  7. Dennis KaarsemakerMar 4, 2016
  8. Christian CouderMar 4, 2016
  9. Johannes SchindelinMar 4, 2016
  10. Junio C HamanoMar 4, 2016

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.