mirror of
https://github.com/gbdev/rgbds.git
synced 2025-12-01 07:17:49 +00:00
Refactor test.sh scripts for consistency
This commit is contained in:
@@ -10,14 +10,15 @@ gbtemp="$(mktemp)"
|
||||
gbtemp2="$(mktemp)"
|
||||
outtemp="$(mktemp)"
|
||||
outtemp2="$(mktemp)"
|
||||
tests=0
|
||||
failed=0
|
||||
rc=0
|
||||
|
||||
# Immediate expansion is the desired behavior.
|
||||
# shellcheck disable=SC2064
|
||||
trap "rm -f ${otemp@Q} ${gbtemp@Q} ${gbtemp2@Q} ${outtemp@Q} ${outtemp2@Q}" EXIT
|
||||
|
||||
tests=0
|
||||
failed=0
|
||||
rc=0
|
||||
|
||||
bold="$(tput bold)"
|
||||
resbold="$(tput sgr0)"
|
||||
red="$(tput setaf 1)"
|
||||
@@ -53,6 +54,7 @@ tryCmp () {
|
||||
fi
|
||||
(( our_rc = our_rc || $? ))
|
||||
}
|
||||
|
||||
tryCmpRom () {
|
||||
# `printf` lets us keep only the first returned word from `wc`.
|
||||
rom_size=$(printf %s $(wc -c <"$1"))
|
||||
|
||||
Reference in New Issue
Block a user