mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-22 23:04:29 +00:00
Use Bash arrays instead of POSIX splitting when possible
This commit is contained in:
+6
-6
@@ -93,9 +93,9 @@ for i in *.asm; do
|
||||
startTest
|
||||
"$RGBASM" -o "$otemp" "${test}.asm"
|
||||
|
||||
RGBLINKFLAGS=""
|
||||
RGBLINKFLAGS=()
|
||||
if [ -f "${test}.flags" ]; then
|
||||
RGBLINKFLAGS="$RGBLINKFLAGS @${test}.flags"
|
||||
RGBLINKFLAGS+=("@${test}.flags")
|
||||
fi
|
||||
|
||||
# Some tests have variants depending on flags
|
||||
@@ -103,14 +103,14 @@ for i in *.asm; do
|
||||
for flag in '-d' '-t' '-w'; do
|
||||
if [ -f "${test}-no${flag}.out" ]; then
|
||||
continueTest "-no${flag}"
|
||||
rgblinkQuiet $RGBLINKFLAGS -o "$gbtemp" "$otemp" 2>"$outtemp"
|
||||
rgblinkQuiet "${RGBLINKFLAGS[@]}" -o "$gbtemp" "$otemp" 2>"$outtemp"
|
||||
tryDiff "${test}-no${flag}.out" "$outtemp"
|
||||
evaluateTest
|
||||
ran_flag=true
|
||||
fi
|
||||
if [ -f "${test}${flag}.out" ]; then
|
||||
continueTest "$flag"
|
||||
rgblinkQuiet $RGBLINKFLAGS ${flag} -o "$gbtemp" "$otemp" 2>"$outtemp"
|
||||
rgblinkQuiet "${RGBLINKFLAGS[@]}" ${flag} -o "$gbtemp" "$otemp" 2>"$outtemp"
|
||||
tryDiff "${test}${flag}.out" "$outtemp"
|
||||
evaluateTest
|
||||
ran_flag=true
|
||||
@@ -125,7 +125,7 @@ for i in *.asm; do
|
||||
[[ -e "$script" ]] || break # If the glob doesn't match, it just... doesn't expand!
|
||||
|
||||
continueTest "${script#${test}}"
|
||||
rgblinkQuiet $RGBLINKFLAGS -l "$script" -o "$gbtemp" "$otemp" 2>"$outtemp"
|
||||
rgblinkQuiet "${RGBLINKFLAGS[@]}" -l "$script" -o "$gbtemp" "$otemp" 2>"$outtemp"
|
||||
tryDiff "${script%.link}.out" "$outtemp"
|
||||
evaluateTest
|
||||
ran_flag=true
|
||||
@@ -136,7 +136,7 @@ for i in *.asm; do
|
||||
|
||||
# The rest of the tests just links a file, and maybe checks the binary
|
||||
continueTest
|
||||
rgblinkQuiet $RGBLINKFLAGS -o "$gbtemp" "$otemp" 2>"$outtemp"
|
||||
rgblinkQuiet "${RGBLINKFLAGS[@]}" -o "$gbtemp" "$otemp" 2>"$outtemp"
|
||||
tryDiff "${test}.out" "$outtemp"
|
||||
bin=${test}.out.bin
|
||||
if [ -f "$bin" ]; then
|
||||
|
||||
Reference in New Issue
Block a user