summaryrefslogtreecommitdiff
path: root/t/test-lib-functions.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-11-04 14:58:01 -0800
committerJunio C Hamano <gitster@pobox.com>2013-11-04 14:58:02 -0800
commita3a9cff0371f5dd3dd199ef227911cd812e1708d (patch)
tree80bb14edae19fa4e93a854f64ebeaf6ae8392568 /t/test-lib-functions.sh
parent68d5fbe285913cf6ff6c62c891539e9600030165 (diff)
parent94221d22036f36e10680c0a1e7eafb4bceeb1248 (diff)
downloadgit-a3a9cff0371f5dd3dd199ef227911cd812e1708d.tar.gz
Merge branch 'jk/wrap-perl-used-in-tests'
* jk/wrap-perl-used-in-tests: t: use perl instead of "$PERL_PATH" where applicable t: provide a perl() function which uses $PERL_PATH
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index f98769427b..2f79146e6c 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -76,11 +76,11 @@ test_decode_color () {
}
nul_to_q () {
- "$PERL_PATH" -pe 'y/\000/Q/'
+ perl -pe 'y/\000/Q/'
}
q_to_nul () {
- "$PERL_PATH" -pe 'y/Q/\000/'
+ perl -pe 'y/Q/\000/'
}
q_to_cr () {
@@ -648,7 +648,7 @@ test_seq () {
2) ;;
*) error "bug in the test script: not 1 or 2 parameters to test_seq" ;;
esac
- "$PERL_PATH" -le 'print for $ARGV[0]..$ARGV[1]' -- "$@"
+ perl -le 'print for $ARGV[0]..$ARGV[1]' -- "$@"
}
# This function can be used to schedule some commands to be run
@@ -711,6 +711,10 @@ test_ln_s_add () {
fi
}
+perl () {
+ command "$PERL_PATH" "$@"
+}
+
# The following mingw_* functions obey POSIX shell syntax, but are actually
# bash scripts, and are meant to be used only with bash on Windows.