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