aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté <msabate@suse.com>2015-08-24 13:47:58 +0200
committerMiquel Sabaté <msabate@suse.com>2015-08-24 13:47:58 +0200
commit974a3655ee95fd22f98262603dca4faf8ed0711f (patch)
treeb3257b4d5fdc99811c732b0dc64f98cc3c46a4c0
parent1709da778ecee257946c0604d3fb68696ad039c1 (diff)
downloadg-974a3655ee95fd22f98262603dca4faf8ed0711f.tar.gz
g-974a3655ee95fd22f98262603dca4faf8ed0711f.zip
t: use __g_realpath instead of realpath
-rw-r--r--t/tests.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/tests.sh b/t/tests.sh
index a0d32e2..2eb0e00 100644
--- a/t/tests.sh
+++ b/t/tests.sh
@@ -15,8 +15,14 @@
set -e
+# From g.sh
+__g_realpath() {
+ [ -d "$1" ] && echo "$(cd "$1" && pwd)" || echo "$(cd "$(dirname "$1")"
+ && pwd)/$(basename "$1")"
+}
+
# Cleanup previous tests and setup some special variables.
-d="$(realpath $(dirname $0))"
+d="$(__g_realpath $(dirname $0))"
rm -f $d/output.txt
HOME="$d"