summaryrefslogtreecommitdiff
path: root/test/helper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/helper.sh')
-rw-r--r--test/helper.sh17
1 files changed, 2 insertions, 15 deletions
diff --git a/test/helper.sh b/test/helper.sh
index d26749c..5016cf8 100644
--- a/test/helper.sh
+++ b/test/helper.sh
@@ -35,21 +35,8 @@ refute() {
resolved_path() {
local original_path="$1"
- local actual_path="$original_path"
- local actual_basename="$(basename "$original_path")"
-
- cd "$(dirname "$original_path")"
-
- while [ -L "$actual_basename" ]; do
- actual_path="$(readlink "$actual_basename")"
- actual_basename="$(basename "$actual_path")"
-
- cd "$(dirname "$actual_path")"
- done
-
- local current_directory="$(pwd -P)"
-
- printf "%s/%s\n" "$current_directory" "$actual_basename"
+ perl -e \
+ "use Cwd realpath; print realpath(\"$original_path\") . \"\\n\";"
}
assert_linked() {