Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-07-08 23:15:02 +0300
committerJunio C Hamano <gitster@pobox.com>2021-07-08 23:15:02 +0300
commit62473695d2e3ef9c07b71d8decce92bc6cd5c469 (patch)
tree2dcc6dd680106440d085e092c93961b1fc041229 /t/test-lib-functions.sh
parent7cc114737164886ef526f74e023d85a2ad011d6d (diff)
parent7c0afdf23c1cb331eab0068d70ad5c0c156f216a (diff)
Merge branch 'jk/test-without-readlink-1'
Some test scripts assumed that readlink(1) was universally installed and available, which is not the case. * jk/test-without-readlink-1: t: use portable wrapper for readlink(1)
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index f0448daa74..b2810478a2 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -1708,3 +1708,9 @@ test_region () {
return 0
}
+
+# Print the destination of symlink(s) provided as arguments. Basically
+# the same as the readlink command, but it's not available everywhere.
+test_readlink () {
+ perl -le 'print readlink($_) for @ARGV' "$@"
+}