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.

32 lines
480B

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