1
0
mirror of https://github.com/sstephenson/bats.git synced 2024-11-17 03:32:27 +01:00
bats/test/test_helper.bash

17 lines
304 B
Bash
Raw Permalink Normal View History

fixtures() {
FIXTURE_ROOT="$BATS_TEST_DIRNAME/fixtures/$1"
RELATIVE_FIXTURE_ROOT="$(bats_trim_filename "$FIXTURE_ROOT")"
}
setup() {
export TMP="$BATS_TEST_DIRNAME/tmp"
}
filter_control_sequences() {
"$@" | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g'
}
teardown() {
2014-06-02 03:21:14 +02:00
[ -d "$TMP" ] && rm -f "$TMP"/*
}