2012-11-16 21:25:45 +01:00
|
|
|
fixtures() {
|
|
|
|
FIXTURE_ROOT="$BATS_TEST_DIRNAME/fixtures/$1"
|
2017-02-15 16:01:32 +01:00
|
|
|
bats_trim_filename "$FIXTURE_ROOT" 'RELATIVE_FIXTURE_ROOT'
|
2012-11-16 21:25:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
setup() {
|
|
|
|
export TMP="$BATS_TEST_DIRNAME/tmp"
|
|
|
|
}
|
|
|
|
|
2013-10-31 01:10:00 +01:00
|
|
|
filter_control_sequences() {
|
|
|
|
"$@" | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g'
|
|
|
|
}
|
|
|
|
|
2017-10-03 04:02:00 +02:00
|
|
|
if ! command -v tput >/dev/null; then
|
|
|
|
tput() {
|
|
|
|
printf '1000\n'
|
|
|
|
}
|
|
|
|
export -f tput
|
|
|
|
fi
|
|
|
|
|
2012-11-16 21:25:45 +01:00
|
|
|
teardown() {
|
2014-06-02 03:21:14 +02:00
|
|
|
[ -d "$TMP" ] && rm -f "$TMP"/*
|
2012-11-16 21:25:45 +01:00
|
|
|
}
|