Sort .sym files in ascending order, and test for it (#1355)

This commit is contained in:
Sylvie
2024-03-13 18:32:35 -04:00
committed by GitHub
parent 658286c8e4
commit 8ec0d01fc4
7 changed files with 64 additions and 7 deletions

View File

@@ -9,13 +9,14 @@ otemp="$(mktemp)"
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}" EXIT
trap "rm -f ${otemp@Q} ${gbtemp@Q} ${gbtemp2@Q} ${outtemp@Q} ${outtemp2@Q}" EXIT
bold="$(tput bold)"
resbold="$(tput sgr0)"
@@ -276,6 +277,17 @@ for i in section-union/*.asm; do
evaluateTest
done
test="symbols"
startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
"$RGBASM" -o "$gbtemp2" "$test"/b.asm
continueTest
rgblinkQuiet -o "$gbtemp" -n "$outtemp2" "$gbtemp2" "$otemp" 2>"$outtemp"
tryDiff "$test"/out.err "$outtemp"
tryDiff "$test"/ref.out.sym "$outtemp2"
tryCmpRom "$test"/ref.out.bin
evaluateTest
if [[ "$failed" -eq 0 ]]; then
echo "${bold}${green}All ${tests} tests passed!${rescolors}${resbold}"
else