]> asedeno.scripts.mit.edu Git - git.git/blobdiff - t/t9700-perl-git.sh
Merge branch 'mo/maint-crlf-doc' into maint
[git.git] / t / t9700-perl-git.sh
index 9706ee5773692bd8fcfbc9015ef062947c0a2da5..8686086dde9dba742bd805c31f3e28c658b03a9b 100755 (executable)
@@ -6,8 +6,13 @@
 test_description='perl interface (Git.pm)'
 . ./test-lib.sh
 
-perl -MTest::More -e 0 2>/dev/null || {
-       say_color skip "Perl Test::More unavailable, skipping test"
+if ! test_have_prereq PERL; then
+       say 'skipping perl interface tests, perl not available'
+       test_done
+fi
+
+"$PERL_PATH" -MTest::More -e 0 2>/dev/null || {
+       say "Perl Test::More unavailable, skipping test"
        test_done
 }
 
@@ -24,21 +29,25 @@ test_expect_success \
      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 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
      '
 
 test_external_without_stderr \
     'Perl API' \
-    perl ../t9700/test.pl
+    "$PERL_PATH" "$TEST_DIRECTORY"/t9700/test.pl
 
 test_done