diff options
author | Kerin Millar <kfm@plushkava.net> | 2024-05-18 11:20:06 +0100 |
---|---|---|
committer | Kerin Millar <kfm@plushkava.net> | 2024-05-18 11:20:06 +0100 |
commit | 895bd87dc035ace26aefb460ee0a192da6c9521e (patch) | |
tree | 37a6638b1e83b37c82127006e73df40b31eddb45 | |
parent | test-functions: Fix a spurious test failure (diff) | |
download | gentoo-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-x | test-functions | 4 |
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 ' |