summaryrefslogtreecommitdiff
path: root/makeinfo/tests/twofiles
blob: 22c477c9d57da1d93592cfa2b04b3624471ccd40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# $Id: twofiles,v 1.3 2004/04/11 17:56:47 karl Exp $
# Test that an existing and nonexisting file doesn't cause a
# segmentation fault.
# From: Arkadiusz Miskiewicz <misiek@pld.ORG.PL>, 15 Feb 2003 13:22:49 +0100.

unset TEXINFO_OUTPUT
: ${srcdir=.}

outfile=outfile
errfile=errfile
trap 'status=$?; rm -f $outfile $errfile && exit $status' 0

../makeinfo -o /dev/null $srcdir/html-min.txi /nonexistent.texinfo \
>$outfile 2>$errfile
exit_status=$?

# we expect one error message about /nonexistent.texinfo and bad exit status.
test $exit_status -ne 0 \
&& grep /nonexistent $errfile >/dev/null \
&& exit_status=0

exit $exit_status