Mirror of CollapseOS
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
603B

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