#! /bin/sh # Copyright (C) 2015 Peter Breitenlohner # You may freely use, modify and/or distribute this file. echo && echo "*** fixmsxpart --help" ./fixmsxpart --help || exit 1 echo && echo "*** fixmsxpart --version" ./fixmsxpart --version || exit 1 echo && echo "*** fixmsxpart -dd (missing infile)" ./fixmsxpart -dd && exit 1 echo && echo "*** fixmsxpart too many args" ./fixmsxpart too many args && exit 1 : ${testsrc:=$srcdir/tests} echo && echo "*** generate fixtest.exp with version and date" yyyymmdd=`date +%F` version=`./fixmsxpart -v | sed 's/^This .* version \(.*\).$/\1/'` { echo "% Generated on $yyyymmdd by fixmsxpart ($version)." cat $testsrc/fixtest.out; } >fixtest.exp echo && echo "*** fixmsxpart tests/fixtest fixtest" ./fixmsxpart $testsrc/fixtest fixtest || exit 1 echo && echo "*** diff fixtest.exp fixtest.tex" diff fixtest.exp fixtest.tex || exit 1 echo && echo "*** fixmsxpart tests/fixtest >fixtest.out" ./fixmsxpart $testsrc/fixtest >fixtest.out || exit 1 echo && echo "*** diff fixtest.exp fixtest.out" diff fixtest.exp fixtest.out || exit 1