diff --git a/test/run b/test/run index cdb1145a..71a87129 100755 --- a/test/run +++ b/test/run @@ -31,7 +31,7 @@ set_tool() { } -cd "${BASH_SOURCE[0]%/*}" +cd "$(dirname "${BASH_SOURCE[0]}")" # Loop over the arguments. diff --git a/test/runCompletion b/test/runCompletion index 01af7e6c..97f54127 100755 --- a/test/runCompletion +++ b/test/runCompletion @@ -4,4 +4,4 @@ # isn't initialized at that point (i.e. output of `expect' is shown on # stdout - `open_logs' hasn't run yet?). And running code from a library # file isn't probably a good idea either. -"$BASH" "${BASH_SOURCE[0]%/*}/run" --tool completion $* +"$BASH" "$(dirname "${BASH_SOURCE[0]}")/run" --tool completion $* diff --git a/test/runUnit b/test/runUnit index 597342dc..9ce71efa 100755 --- a/test/runUnit +++ b/test/runUnit @@ -4,4 +4,4 @@ # isn't initialized at that point (i.e. output of `expect' is shown on # stdout - `open_logs' hasn't run yet?). And running code from a library # file isn't probably a good idea either. -"$BASH" "${BASH_SOURCE[0]%/*}/run" --tool unit $* +"$BASH" "$(dirname "${BASH_SOURCE[0]}")/run" --tool unit $*