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.