NetBSD/gnu/dist/texinfo/util/txitextest
wiz 6285cf0f68 Import of texinfo-4.5.
Major changes since 4.3:
* Language:
  . The ' (ASCII apostrophe/right quote) character is finally allowed in
    node and anchor names.  Thus, after installing this texinfo.tex,
    existing .aux files will cause errors!  Remove them and rerun TeX to
    generate good ones.
  . @value constructs are now expanded in the filename arguments to
    @include and @verbatiminclude.
* texinfo.tex:
  . @smallexample and the like now output in a smaller font (9pt) in all
    paper formats, not just @smallbook and @afourpaper.
  . new translation txi-tr.tex.
* info:
  . CTRL-H is treated like DEL in incremental search.
  . arrow keys once again work in isearch contexts under Solaris.
* infokey:
  . use .info key bindings before defaults.
  . allow prefix keys to be disabled.
Bug fixes all around.
2003-02-13 08:50:20 +00:00

78 lines
2.0 KiB
Bash

#!/bin/sh
# Id: txitextest,v 1.4 2003/02/05 00:54:07 karl Exp
# Test texinfo.tex changes by running various manuals through with an
# old version, saving the .ps result from dvips, doing the same with a
# new version, and comparing. Idea from Stepan Kasal.
#
# Another option is to run the manuals all the way through using
# texi2dvi, which tests in another way.
tsrc=/u/texinfo/src
PATH=$tsrc/util:$PATH
tdoc=$tsrc/doc
default_manuals="$tdoc/texinfo.txi $tdoc/info.texi $tdoc/info-stnd.texi"
olddir=$HOME/gnu/src/gnulib/config
newdir=$tdoc
tempdir=/u/texinfo/@tests/testdir
full=false
manuals=
while test $# -gt 0; do
case $1 in
--f*) full=true;;
--o*) shift; olddir="$1";;
--n*) shift; newdir="$1";;
--t*) shift; tempdir="$1";;
-*) echo "$0: unknown option \`$1'." >&2; exit 1;;
*) manuals="$manuals $1";;
esac
shift
done
test -z "$manuals" && manuals=$default_manuals
initial_dir=`pwd`
cd $tempdir || exit 1
rm -f *
run_tex() \
{
TEXINPUTS=.:$mandir: tex $manual \
|| { echo "tex $manual failed." >&2; exit 1; }
}
for manual in $manuals; do
mandir=`dirname $manual`
test $mandir = . && mandir=$initial_dir
manual_base=`basename "$manual" | sed 's/\.[^.]*$//'`
rm -f $manual_base.* texinfo.tex
ln -s $newdir/texinfo.tex texinfo.tex
if $full; then
# instead of comparing, do full test of just the new texinfo.tex.
echo "$0: testing $manual_base... (tex)"
texi2dvi $manual || { echo "texi2dvi $manual failed." >&2; exit 1; }
echo "$0: testing $manual_base... (pdf)"
texi2dvi --pdf $manual \
|| { echo "texi2dvi --pdf $manual failed." >&2; exit 1; }
else
echo "$0: testing $manual_base... (new)"
run_tex
dvips $manual_base -o || exit 1
mv $manual_base.ps new.$manual_base.ps
echo "$0: testing $manual_base... (old)"
rm -f $manual_base.* texinfo.tex
ln -s $olddir/texinfo.tex texinfo.tex
run_tex
dvips $manual_base -o || exit 1
mv $manual_base.ps old.$manual_base.ps
diff -U0 old.$manual_base.ps new.$manual_base.ps
fi
done