diff options
author | Kerin Millar <kfm@plushkava.net> | 2024-05-21 11:48:37 +0100 |
---|---|---|
committer | Kerin Millar <kfm@plushkava.net> | 2024-05-21 13:51:48 +0100 |
commit | 7b63d3d64275c32676a8cad3377294ab59b54486 (patch) | |
tree | e1466df84cf98e074466dd67f6ec0ed5d7a92481 | |
parent | test-functions: Render tests somewhat fast again (diff) | |
download | gentoo-functions-7b63d3d64275c32676a8cad3377294ab59b54486.tar.gz gentoo-functions-7b63d3d64275c32676a8cad3377294ab59b54486.tar.bz2 gentoo-functions-7b63d3d64275c32676a8cad3377294ab59b54486.zip |
test-functions: Minor ebegin() test refactoring
Signed-off-by: Kerin Millar <kfm@plushkava.net>
-rwxr-xr-x | test-functions | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test-functions b/test-functions index 6f755db..d65a3a2 100755 --- a/test-functions +++ b/test-functions @@ -95,19 +95,19 @@ test_ebegin() { _eprint() { shift _ends_with_newline "$*" - ok=$(( $? == 0 )) } ok=0 set -- "message" ebegin "$1" + retval=$? - if [ "${ok}" -eq 0 ]; then + if [ "${retval}" -ne 0 ]; then printf 'not ' fi printf 'ok %d - ebegin %s (expecting terminating newline)\n' "$((testnum + 1))" "$1" - return "$(( ok ? 0 : 1 ))" + return "${retval}" } test_edo() { |