#!/bin/sh # $Id: run,v 1.4 1996/12/21 16:14:11 JCL Exp $ # These tests will check if the document parts of test.tex # are found, depending on various conditions. # The tests focuse on the interaction of TEXINPUTS, internal # path handling of LaTeX2HTML, and texexpand. # $Log: run,v $ # Revision 1.4 1996/12/21 16:14:11 JCL # bad typo # # Revision 1.3 1996/12/20 20:29:51 JCL # revised with cleanup # # Revision 1.2 1996/12/16 20:24:40 JCL # revised # # Revision 1.1 1996/12/13 16:25:39 JCL # small test for directory handling (TEXINPUTS/LaTeX2HTML/texexpand # interaction) # L2H=latex2html cleanup() { rm -rf test rm -rf tmp rm -rf dir rm -f l2h.log } checkresults() { RES=`grep -i "unknown commands" l2h.log | grep two | grep three` if [ "x$RES" = x ] ; then echo FAILURE exit 1 else echo 'SUCCESS (EXPECTED)' fi } if [ "x$1" = "x-c" ]; then cleanup exit 0 fi # Overall preparation cleanup mkdir dir cp test3.tex dir # The Tests # Test 1 # Check expansion with plain file invocation. echo Running test 1/3... $L2H test.tex > l2h.log 2>&1 checkresults rm -r test rm l2h.log # Test 2 # Check with relative pathname. echo Running test 2/3... mkdir tmp cd tmp $L2H ../test.tex > l2h.log 2>&1 checkresults cd .. rm -r tmp # Test 3 # Check with absolute pathname. echo Running test 3/3... mkdir tmp wd=`pwd` cd tmp $L2H $wd/test.tex > l2h.log 2>&1 checkresults cd .. rm -r tmp # Clean up cleanup