commit: 895bd87dc035ace26aefb460ee0a192da6c9521e
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sat May 18 10:20:06 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 18 10:20:06 2024 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=895bd87d
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 <AT> plushkava.net>
test-functions | 4 ++--
1 file 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 '