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.

29 lines
487B

  1. #!/bin/sh -e
  2. EMULDIR=../../emul
  3. SHELL="${EMULDIR}/shell/shell"
  4. replay() {
  5. fn=$1
  6. replayfn=${fn%.*}.expected
  7. ACTUAL=$("${SHELL}" -f test.cfs < "${fn}" 2> /dev/null)
  8. EXPECTED=$(cat ${replayfn})
  9. if [ "$ACTUAL" = "$EXPECTED" ]; then
  10. echo ok
  11. else
  12. echo different. Whole output:
  13. echo "${ACTUAL}"
  14. exit 1
  15. fi
  16. }
  17. if [ ! -z $1 ]; then
  18. replay $1
  19. exit 0
  20. fi
  21. for fn in *.replay; do
  22. echo "Replaying ${fn}"
  23. replay "${fn}"
  24. done