1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-08 17:28:05 +11:00
collapseos/tools/tests/avra/runtests.sh
2019-12-13 17:38:40 -05:00

29 lines
433 B
Bash
Executable File

#!/bin/sh -e
AVRA=../../emul/zasm/avra
cmpas() {
FN=$1
EXPECTED=$(xxd ${FN%.*}.expected)
ACTUAL=$(cat ${FN} | $AVRA | xxd)
if [ "$ACTUAL" = "$EXPECTED" ]; then
echo ok
else
echo actual
echo "$ACTUAL"
echo expected
echo "$EXPECTED"
exit 1
fi
}
if [ ! -z $1 ]; then
cmpas $1
exit 0
fi
for fn in *.asm; do
echo "Comparing ${fn}"
cmpas $fn
done