From 3497421c4fc39b68fc775d2c00ef52ca9f90b64e Mon Sep 17 00:00:00 2001 From: Nathaniel Landau Date: Thu, 21 Oct 2021 16:06:52 -0400 Subject: [PATCH] fix tests --- test/{scriptTemplate.bats => template_source_utils.bats} | 4 ++-- test/{standaloneTemplate.bats => template_standalone.bats} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename test/{scriptTemplate.bats => template_source_utils.bats} (97%) rename test/{standaloneTemplate.bats => template_standalone.bats} (97%) diff --git a/test/scriptTemplate.bats b/test/template_source_utils.bats similarity index 97% rename from test/scriptTemplate.bats rename to test/template_source_utils.bats index d0ec301..b45ec50 100755 --- a/test/scriptTemplate.bats +++ b/test/template_source_utils.bats @@ -6,7 +6,7 @@ load 'test_helper/bats-assert/load' ######## SETUP TESTS ######## ROOTDIR="$(git rev-parse --show-toplevel)" -s="${ROOTDIR}/scriptTemplate.sh" +s="${ROOTDIR}/template_source_utils.sh" if [ -f "${s}" ]; then base="$(basename "${s}")" @@ -67,7 +67,7 @@ teardown() { assert_file_exist "${TESTDIR}/logs/log.txt" run cat "${TESTDIR}/logs/log.txt" - assert_line --index 0 --regexp "\[ error\] \[.*\] This is error text \( _mainScript_:scriptTemplate.* \)" + assert_line --index 0 --regexp "\[ error\] \[.*\] This is error text \( _mainScript_:${base}.* \)" assert_line --index 1 "" } diff --git a/test/standaloneTemplate.bats b/test/template_standalone.bats similarity index 97% rename from test/standaloneTemplate.bats rename to test/template_standalone.bats index 679f7bf..26585c1 100755 --- a/test/standaloneTemplate.bats +++ b/test/template_standalone.bats @@ -6,7 +6,7 @@ load 'test_helper/bats-assert/load' ######## SETUP TESTS ######## ROOTDIR="$(git rev-parse --show-toplevel)" -s="${ROOTDIR}/standaloneTemplate.sh" +s="${ROOTDIR}/template_standalone.sh" if [ -f "${s}" ]; then base="$(basename "${s}")" @@ -67,7 +67,7 @@ teardown() { assert_file_exist "${TESTDIR}/logs/log.txt" run cat "${TESTDIR}/logs/log.txt" - assert_line --index 0 --regexp "\[ error\] \[.*\] This is error text \( _mainScript_:standaloneTemplate.* \)" + assert_line --index 0 --regexp "\[ error\] \[.*\] This is error text \( _mainScript_:${base}.* \)" assert_line --index 1 "" }