Use POSIX arithmetic expansion

This commit is contained in:
Neale Pickett 2021-02-02 20:38:59 -07:00
parent 441f8a014e
commit 30e9205e20
1 changed files with 3 additions and 4 deletions

View File

@ -5,25 +5,24 @@ successes=0
failures=0 failures=0
H () { H () {
section="$*"
printf "\n%-20s " "$*" printf "\n%-20s " "$*"
} }
title() { title() {
thistest="$1" thistest="$1"
tests=$(expr $tests + 1) tests=$(($tests + 1))
} }
successes=0 successes=0
pass () { pass () {
printf '.' printf '.'
successes=$(expr $successes + 1) successes=$(($successes + 1))
} }
failures=0 failures=0
fail () { fail () {
printf '(%s)' "$thistest" printf '(%s)' "$thistest"
failures=$(expr $failures + 1) failures=$(($failures + 1))
} }