#!/bin/sh if [ $# -lt 1 ]; then echo "Need to pass in names of Maxima test files to use" exit 1 fi # First, build up the Maxima batch file rm -f mathmltest.mac for i in $@ do # The following is easy but does not cope with multiline test output # sed 's/.*\$$/tmp:%;mathml(tmp,"mathmltest.xml");tmp;/' $i >> mathmltest.mac echo "/* $i */" >> mathmltest.mac awk '{line[count]=$0; count++;} /; *$/ {lastsemicolonline=NR; for (i=0; i < count; i++) print line[i]; delete line; count=0;} /\$ *$/ {lastdollarline=NR; count=0; print "tmp:%;mathml(tmp,\"mathmltest.xml\");tmp;"}' $i >> mathmltest.mac done # Now run Maxima over the test file, to produce mathmltest.xml rm -f mathmltest.xml mathmltest_ie.xml ../maxima-local -b mathmltest.mac # Now insert some paragraph breaks sed 's/
//' mathmltest.xml > tmp$$ sed 's/