run-testsuite 382 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. set -eu
  3. export TZ=UTC
  4. cd tests
  5. EXIT=0
  6. for i in *.testfile; do
  7. printf 'Testing: %s ... ' "$i"
  8. if [ -f ${i%%.testfile}.magic ]; then
  9. m="-m ${i%%.testfile}.magic"
  10. else
  11. m=
  12. fi;
  13. if [ "$(file -b $m "$i")" = "$(cat ${i%%.testfile}.result)" ] ; then
  14. echo 'pass'
  15. else
  16. echo 'FAILED'
  17. EXIT=1
  18. fi
  19. done
  20. exit $EXIT