test-batch.sh 468 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. TEST_FILENAME=`echo "$0" | sed 's|\.sh$||'`
  3. ./test_decode $TEST_FILENAME
  4. ret=$?
  5. # pretty-print a diff showing what happened, and leave the dumped
  6. # around for possibly moving over the ref.
  7. if test $ret = 1; then
  8. REF_FILENAME="$TEST_FILENAME-ref.txt"
  9. NEW_FILENAME="$TEST_FILENAME-new.txt"
  10. ./test_decode $TEST_FILENAME -dump > $NEW_FILENAME
  11. if test $? = 0; then
  12. echo "Differences:"
  13. diff -u $REF_FILENAME $NEW_FILENAME
  14. fi
  15. fi
  16. exit $ret