Code

Merge branch 'ml/maint-grep-doc' into maint
[git.git] / t / t9401-git-cvsserver-crlf.sh
index 888223013444999817a93082418fb60690a425e3..ed7b513f3e82706f6455bb32f4f19a5161bb0415 100755 (executable)
@@ -11,14 +11,6 @@ repository using cvs CLI client via git-cvsserver server'
 
 . ./test-lib.sh
 
-q_to_nul () {
-    perl -pe 'y/Q/\000/'
-}
-
-q_to_cr () {
-    tr Q '\015'
-}
-
 marked_as () {
     foundEntry="$(grep "^/$2/" "$1/CVS/Entries")"
     if [ x"$foundEntry" = x"" ] ; then
@@ -51,12 +43,15 @@ if test $? -ne 1
 then
     say 'skipping git-cvsserver tests, cvs not found'
     test_done
-    exit
 fi
-perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
+if ! test_have_prereq PERL
+then
+    say 'skipping git-cvsserver tests, perl not available'
+    test_done
+fi
+"$PERL_PATH" -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
     say 'skipping git-cvsserver tests, Perl SQLite interface unavailable'
     test_done
-    exit
 }
 
 unset GIT_DIR GIT_CONFIG