Skip to content

Commit 4436b78

Browse files
committed
bats-helpers: Export test_printf
Makes it easier to add to programs under test without requiring that they source `lib/bats/helpers`.
1 parent 6d356ba commit 4436b78

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

lib/bats/helpers

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ test_printf() {
210210
printf "$@" >&2
211211
fi
212212
}
213+
export -f test_printf
213214

214215
# Skips a test if `TEST_FILTER` is set but doesn't match `BATS_TEST_DESCRIPTION`
215216
#

tests/bats-helpers.bats

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ teardown() {
145145

146146
@test "$SUITE: test_printf" {
147147
create_bats_test_script test-script \
148-
". '$_GO_CORE_DIR/lib/bats/helpers'" \
149148
"test_printf '%s\n' 'some test debug output'"
150149

151150
run "$BATS_TEST_ROOTDIR/test-script"

0 commit comments

Comments
 (0)