1
0
mirror of https://github.com/sstephenson/bats.git synced 2026-02-25 17:28:11 +01:00

Initial tests

This commit is contained in:
Sam Stephenson
2011-12-28 16:21:48 -06:00
parent c850527cce
commit b9cfa7470c
4 changed files with 36 additions and 1 deletions

View File

@@ -20,7 +20,11 @@ abs_dirname() {
}
expand_path() {
echo "$(abs_dirname "$(dirname "$1")")/$(basename "$1")"
{ cd "$(dirname "$1")" 2>/dev/null
local dirname="$PWD"
cd "$OLDPWD"
echo "$dirname/$(basename "$1")"
} || echo "$1"
}
BATS_LIBEXEC="$(abs_dirname "$0")"