summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKerin Millar <kfm@plushkava.net>2024-05-21 11:48:37 +0100
committerKerin Millar <kfm@plushkava.net>2024-05-21 13:51:48 +0100
commit7b63d3d64275c32676a8cad3377294ab59b54486 (patch)
treee1466df84cf98e074466dd67f6ec0ed5d7a92481
parenttest-functions: Render tests somewhat fast again (diff)
downloadgentoo-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-xtest-functions6
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() {