mirror of
https://github.com/sstephenson/bats.git
synced 2024-12-26 14:39:46 +01:00
bats_test_info -> bats_test_begin; begin calls setup
This commit is contained in:
parent
a773171777
commit
7849374964
|
@ -63,8 +63,9 @@ skip() {
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
bats_test_info() {
|
bats_test_begin() {
|
||||||
BATS_TEST_DESCRIPTION="$1"
|
BATS_TEST_DESCRIPTION="$1"
|
||||||
|
setup
|
||||||
}
|
}
|
||||||
|
|
||||||
bats_test_function() {
|
bats_test_function() {
|
||||||
|
@ -141,9 +142,7 @@ bats_perform_test() {
|
||||||
trap "bats_debug_trap \"\$BASH_SOURCE\" \$LINENO" debug
|
trap "bats_debug_trap \"\$BASH_SOURCE\" \$LINENO" debug
|
||||||
trap "bats_error_trap" err
|
trap "bats_error_trap" err
|
||||||
trap "bats_teardown_trap" exit
|
trap "bats_teardown_trap" exit
|
||||||
{ setup
|
"$BATS_TEST_NAME" >>"$BATS_OUT" 2>&1
|
||||||
"$BATS_TEST_NAME"
|
|
||||||
} >>"$BATS_OUT" 2>&1
|
|
||||||
BATS_TEST_COMPLETED=1
|
BATS_TEST_COMPLETED=1
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
|
@ -40,7 +40,7 @@ while IFS= read -r line; do
|
||||||
name="$(eval echo "$quoted_name")"
|
name="$(eval echo "$quoted_name")"
|
||||||
encoded_name="$(encode_name "$name")"
|
encoded_name="$(encode_name "$name")"
|
||||||
tests["${#tests[@]}"]="$encoded_name"
|
tests["${#tests[@]}"]="$encoded_name"
|
||||||
echo "${encoded_name}() { bats_test_info ${quoted_name} ${index}"
|
echo "${encoded_name}() { bats_test_begin ${quoted_name} ${index}"
|
||||||
else
|
else
|
||||||
printf "%s\n" "$line"
|
printf "%s\n" "$line"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user