1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 20:18:04 +11:00
collapseos/tests/z80/runtests.sh
Virgil Dupras efe4b13a4e Move /emul to /emul/z80
I'm planning on adding other subfolders. 8086 for example...
2020-10-24 16:50:22 -04:00

27 lines
360 B
Bash
Executable File

#!/bin/sh -e
BASE=../..
EXEC="${BASE}/emul/z80/forth"
TMP=$(mktemp)
chk() {
echo "Running test $1"
cat ../harness.fs $1 > ${TMP}
if ! ${EXEC} ${TMP}; then
exit 1
fi
}
if [ ! -z $1 ]; then
chk $1
exit 0
fi
# those tests run without any builtin
for fn in test_*.fs; do
chk "${fn}"
done
echo "All tests passed!"
rm ${TMP}