mirror of
https://github.com/sstephenson/bats.git
synced 2024-12-26 06:29:47 +01:00
Style
This commit is contained in:
parent
6b4802cf54
commit
c7b0e6eba8
|
@ -30,14 +30,15 @@ BATS_TEST_DIRNAME="$(dirname "$BATS_TEST_FILENAME")"
|
||||||
BATS_TEST_NAMES=()
|
BATS_TEST_NAMES=()
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
local inc="$1"
|
local name="$1"
|
||||||
local filename
|
local filename
|
||||||
|
|
||||||
if [[ "${inc}" == "/"* ]] ; then
|
if [ "${name:0:1}" = "/" ]; then
|
||||||
filename="${inc}"
|
filename="${name}"
|
||||||
else
|
else
|
||||||
filename="$BATS_TEST_DIRNAME/${inc}.bash"
|
filename="$BATS_TEST_DIRNAME/${name}.bash"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -f "$filename" ] || {
|
[ -f "$filename" ] || {
|
||||||
echo "bats: $filename does not exist" >&2
|
echo "bats: $filename does not exist" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user