#!/bin/sh # $Id: run,v 1.1 1996/12/20 20:31:47 JCL Exp $ # These tests will check if LaTeX's long dash -- is correctly # reduced to HTML's dash -. # Yeah, this test is pretty lame. (But why not). # The tests focuse on title, author, section heading, figure, # footnote, verbatim text, image. # $Log: run,v $ # Revision 1.1 1996/12/20 20:31:47 JCL # a dash test. neat, but powerful. # Ross may sleep like a baby now. # # 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 Warnings indicates failure # (no section numbers, etc.) # Do we have HTML comment affected? RES=`grep -i "converted with" test/*.html | grep ""` if [ "x$RES" = x ] ; then echo 'FAILURE (header affected)' exit 1 fi # Do we have --- -- - correctly reduced to -- - -? RES=`grep "[-]-- -- -" test/*.html | grep -v verb` if [ "x$RES" != x ] ; then echo 'FAILURE (long dash not reduced in text)' exit 1 fi # Do we have --- -- - left as is in verbatim text? RES=`grep -i "dash --- -- - verb" test/*.html` if [ "x$RES" = x ] ; then echo 'FAILURE (long dash reduced in verbatim text)' exit 1 fi # Do we have --- -- - left as is in the image? RES=`grep -i "dash --- -- - figure" test/images.tex` if [ "x$RES" = x ] ; then echo 'FAILURE (long dash reduced in figure)' exit 1 fi echo 'SUCCESS (EXPECTED)' } if [ "x$1" = "x-c" ]; then cleanup exit 0 fi # The Tests # Test 1 # Check expansion with plain file invocation. cleanup 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