commit:     7b63d3d64275c32676a8cad3377294ab59b54486
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Tue May 21 10:48:37 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 21 12:51:48 2024 +0000
URL:        
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=7b63d3d6

test-functions: Minor ebegin() test refactoring

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>

 test-functions | 6 +++---
 1 file 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() {

Reply via email to