#!/bin/bash # Shell script to test Mathomatic. # Just run this while in the tests directory # to see if Mathomatic runs properly on your system. # After reading in and executing the Mathomatic scripts in "all.in", # it does a diff between the output of the test and the expected output. # If no differences are reported, "All tests passed" is displayed. MATHOMATICPATH="../mathomatic" if [ ! -x "$MATHOMATICPATH" ] then MATHOMATICPATH=mathomatic fi echo Testing $MATHOMATICPATH time "$MATHOMATICPATH" -t all 0<&- >test.out && diff -u all.out test.out && echo All tests passed. && rm test.out && exit 0 echo Test failed. rm -f test.out exit 1