Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
360B

  1. #!/bin/sh -e
  2. BASE=../..
  3. EXEC="${BASE}/emul/z80/forth"
  4. TMP=$(mktemp)
  5. chk() {
  6. echo "Running test $1"
  7. cat ../harness.fs $1 > ${TMP}
  8. if ! ${EXEC} ${TMP}; then
  9. exit 1
  10. fi
  11. }
  12. if [ ! -z $1 ]; then
  13. chk $1
  14. exit 0
  15. fi
  16. # those tests run without any builtin
  17. for fn in test_*.fs; do
  18. chk "${fn}"
  19. done
  20. echo "All tests passed!"
  21. rm ${TMP}