From 9906dfb33fbd7c465898020c3bc663d35331bfb3 Mon Sep 17 00:00:00 2001 From: joshr Date: Sat, 14 Jul 2018 15:23:39 -0400 Subject: [PATCH] show any diagnostics that might come out of bats tests. also adds comment about diagnostic messages in bats. --- utils/tests.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/tests.sh b/utils/tests.sh index 3ac0453b..7a4f2e3e 100755 --- a/utils/tests.sh +++ b/utils/tests.sh @@ -6,4 +6,7 @@ set -e # Running all the bats-tests in a dir with spaces: cd "${SECRET_PROJECT_ROOT}"; rm -rf 'tempdir with spaces'; mkdir 'tempdir with spaces'; cd 'tempdir with spaces'; -bats "${SECRET_PROJECT_ROOT}/tests" + +# bats expects diagnostic lines to be sent to fd 3, matching reges '^ #' (IE, like: echo "# message here") +# 3>&1 shows diagnostic output when errors occur. +bats --tap "${SECRET_PROJECT_ROOT}/tests/" 3>&1