~ubuntu-branches/ubuntu/maverick/texinfo/maverick

« back to all changes in this revision

Viewing changes to util/txitextest

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2005-10-28 15:10:30 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051028151030-ha5ens3pi9e02ksw
Tags: 4.8-2
* Edit the changelog entry for 4.8-1 to include fixes for bugs that
  have been later closed via the email interface.
* Save debian/changelog in utf8 encoding (Closes: #333630)
* replace egrep and fgrep and numerical signals (Closes: #256287)
* include patch to info translations to fix crash on Ctrl-h, and
  regenerate the gmo files on build (Closes: #150710, #199615)
* include documentation into the info package, too (Closes: #261539)
* fix a typo in texinfo.info (Closes: #226898)
* fix a warning of texi2dvi if TEXINPUTS contains a not existent dir
  (Closes: #276006)
* add 50cyrtexinfo.cnf to fmt.d, and write a README.cyrtexinfo how to
  create a cyrillic texinfo format (Closes: #253124)
* Upload sponsored by Frank Küster <frank@debian.org>

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# $Id: txitextest,v 1.5 2004/04/11 17:56:47 karl Exp $
 
3
# Test texinfo.tex changes by running various manuals through with an
 
4
# old version, saving the .ps result from dvips, doing the same with a
 
5
# new version, and comparing.  Idea from Stepan Kasal.
 
6
 
7
# Another option is to run the manuals all the way through using
 
8
# texi2dvi, which tests in another way.
 
9
 
 
10
tsrc=/u/texinfo/src
 
11
PATH=$tsrc/util:$PATH
 
12
 
 
13
tdoc=$tsrc/doc
 
14
default_manuals="$tdoc/texinfo.txi $tdoc/info.texi $tdoc/info-stnd.texi"
 
15
 
 
16
olddir=$HOME/gnu/src/gnulib/config
 
17
newdir=$tdoc
 
18
tempdir=/u/texinfo/@tests/testdir
 
19
full=false
 
20
manuals=
 
21
 
 
22
while test $# -gt 0; do
 
23
  case $1 in
 
24
  --f*) full=true;;
 
25
  --o*) shift; olddir="$1";;
 
26
  --n*) shift; newdir="$1";;
 
27
  --t*) shift; tempdir="$1";;
 
28
  -*) echo "$0: unknown option \`$1'." >&2; exit 1;;
 
29
  *) manuals="$manuals $1";;
 
30
  esac
 
31
  shift
 
32
done
 
33
 
 
34
test -z "$manuals" && manuals=$default_manuals
 
35
initial_dir=`pwd`
 
36
 
 
37
cd $tempdir || exit 1
 
38
rm -f *
 
39
 
 
40
run_tex() \
 
41
{
 
42
  TEXINPUTS=.:$mandir: tex $manual \
 
43
  || { echo "tex $manual failed." >&2; exit 1; }
 
44
}
 
45
 
 
46
for manual in $manuals; do
 
47
  mandir=`dirname $manual`
 
48
  test $mandir = . && mandir=$initial_dir
 
49
  manual_base=`basename "$manual" | sed 's/\.[^.]*$//'`
 
50
  
 
51
  rm -f $manual_base.* texinfo.tex
 
52
  ln -s $newdir/texinfo.tex texinfo.tex
 
53
 
 
54
  if $full; then
 
55
    # instead of comparing, do full test of just the new texinfo.tex.
 
56
    echo "$0: testing $manual_base... (tex)"
 
57
    texi2dvi $manual || { echo "texi2dvi $manual failed." >&2; exit 1; }
 
58
    echo "$0: testing $manual_base... (pdf)"
 
59
    texi2dvi --pdf $manual \
 
60
    || { echo "texi2dvi --pdf $manual failed." >&2; exit 1; }
 
61
   
 
62
  else
 
63
    echo "$0: testing $manual_base... (new)"
 
64
    run_tex
 
65
    dvips $manual_base -o || exit 1
 
66
    mv $manual_base.ps new.$manual_base.ps
 
67
 
 
68
    echo "$0: testing $manual_base... (old)"
 
69
    rm -f $manual_base.* texinfo.tex
 
70
    ln -s $olddir/texinfo.tex texinfo.tex
 
71
    run_tex
 
72
    dvips $manual_base -o || exit 1
 
73
    mv $manual_base.ps old.$manual_base.ps
 
74
 
 
75
    diff -U0 old.$manual_base.ps new.$manual_base.ps
 
76
  fi
 
77
done