mirror of
https://github.com/sstephenson/bats.git
synced 2024-11-17 11:42:33 +01:00
exec-test: Replace type -t
with command -F
Also eliminates a subshell.
This commit is contained in:
parent
3bc03796e9
commit
698fa766a3
|
@ -289,7 +289,7 @@ bats_perform_tests() {
|
|||
|
||||
bats_perform_test() {
|
||||
BATS_TEST_NAME="$1"
|
||||
if [ "$(type -t "$BATS_TEST_NAME" || true)" = "function" ]; then
|
||||
if declare -F "$BATS_TEST_NAME" >/dev/null; then
|
||||
BATS_TEST_NUMBER="$2"
|
||||
if [ -z "$BATS_TEST_NUMBER" ]; then
|
||||
echo "1..1"
|
||||
|
|
Loading…
Reference in New Issue
Block a user