#!/bin/sh # $Id: run,v 1.2 1996/12/16 20:28:20 JCL Exp $ # These tests will check if the document parts are correctly # processed by &text_cleanup. # Requirements: # o &tex_cleanup must be used exactly once on labels, texts, # section headings, etc. # o it mustn't be applied on figures and other environments # passed to LaTeX # The tests currently check for texts, headings, child links, # images, etc. (almost for everything, I hope). # Note: we don't care for the label files, as the behaviour must # be determined first. # $Log: run,v $ # Revision 1.2 1996/12/16 20:28:20 JCL # revised for use with changes to latex2html # # Revision 1.1 1996/12/14 16:46:59 JCL # tests to check for correct usage of &text_cleanup routine # L2H=latex2html LATEX=latex cleanup() { rm -rf test rm -f l2h.log rm -f test.aux rm -f test.log rm -f test.dvi rm -f test.toc } checkresults() { # anything prompted with "cleanup" indicates failure # (warnings, no section numbers, etc.) RES=`grep "cleanup" l2h.log | grep -vi opening | grep -vi loading` if [ "x$RES" != x ] ; then echo 'FAILURE (spurious LaTeX2HTML message)' exit 1 fi # Do we have &text_cleanup applied more than once on # the html document or the labels? RES=`grep cleanupXX test/*.html test/internals.pl test/labels.pl` if [ "x$RES" != x ] ; then echo 'FAILURE (&text_cleanup applied multiple times)' exit 1 fi # Do we have &text_cleanup not applied? RES=`grep cleanupY test/*.html` if [ "x$RES" != x ] ; then echo 'FAILURE (&text_cleanup not applied)' exit 1 fi # Is the image garbled? RES=`grep cleanupX test/images.tex` if [ "x$RES" != x ] ; then echo 'FAILURE (&text_cleanup applied on image contents)' exit 1 fi echo 'SUCCESS (EXPECTED)' } if [ "x$1" = "x-c" ]; then cleanup exit 0 fi #Overall preparation cleanup # The Tests echo Running test 1/1... $LATEX test > /dev/null $LATEX test > /dev/null $L2H -show_section_numbers test.tex > l2h.log 2>&1 checkresults cleanup