Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bats-core/bats-assert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Karns <jason@karns.name>2019-01-29 19:35:21 +0300
committerJason Karns <jason@karns.name>2019-01-29 19:35:21 +0300
commit60ca563b1af96253cc850141581fc8f967cf34a4 (patch)
tree1662879f308eeb9f4837d576318c21670e0c0830 /test
parentbcbc5680274d1c3eb7cea16b21e62568136612d4 (diff)
Initialize bats-defined vars
Resolves var-not-defined shellcheck rule.
Diffstat (limited to 'test')
-rw-r--r--test/test_helper.bash5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_helper.bash b/test/test_helper.bash
index 4c17202..4ca71e8 100644
--- a/test/test_helper.bash
+++ b/test/test_helper.bash
@@ -7,6 +7,10 @@ load "${TEST_DEPS_DIR}/bats-support/load.bash"
# Load library.
load '../load'
+: "${status:=}"
+: "${lines:=}"
+: "${output:=}"
+
assert_test_pass() {
test "$status" -eq 0
test "${#lines[@]}" -eq 0
@@ -16,7 +20,6 @@ assert_test_fail() {
local err_msg="${1-$(cat -)}"
local num_lines="$(printf '%s' "$err_msg" | wc -l)"
-
test "$status" -eq 1
test "${#lines[@]}" -eq "$num_lines"
test "$output" == "$err_msg"