summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKerin Millar <kfm@plushkava.net>2024-05-18 11:20:06 +0100
committerKerin Millar <kfm@plushkava.net>2024-05-18 11:20:06 +0100
commit895bd87dc035ace26aefb460ee0a192da6c9521e (patch)
tree37a6638b1e83b37c82127006e73df40b31eddb45
parenttest-functions: Fix a spurious test failure (diff)
downloadgentoo-functions-895bd87dc035ace26aefb460ee0a192da6c9521e.tar.gz
gentoo-functions-895bd87dc035ace26aefb460ee0a192da6c9521e.tar.bz2
gentoo-functions-895bd87dc035ace26aefb460ee0a192da6c9521e.zip
test-functions: Use test rather than [ to placate shellcheck
Also, fix an accidental - though ultimately harmless - case of SC2027. Signed-off-by: Kerin Millar <kfm@plushkava.net>
-rwxr-xr-xtest-functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/test-functions b/test-functions
index 4360eb2..d46546a 100755
--- a/test-functions
+++ b/test-functions
@@ -77,7 +77,7 @@ test_die() {
eq 255 255
callback() {
- test_description="( exit "$2" ); die"
+ test_description="( exit $2 ); die"
( exit "$2" )
stderr=$(die "$2" 2>&1)
retval=$?
@@ -404,7 +404,7 @@ iterate_tests() {
done
eval "${code}"
retval=$?
- if [ "${retval}" -"$1" "$2" ]; then
+ if test "${retval}" -"$1" "$2"; then
passed=$((passed + 1))
else
printf 'not '