1#!/bin/sh
2# Id: twofiles,v 1.3 2004/04/11 17:56:47 karl Exp 
3# Test that an existing and nonexisting file doesn't cause a
4# segmentation fault.
5# From: Arkadiusz Miskiewicz <misiek@pld.ORG.PL>, 15 Feb 2003 13:22:49 +0100.
6
7unset TEXINFO_OUTPUT
8: ${srcdir=.}
9
10outfile=outfile
11errfile=errfile
12trap 'status=$?; rm -f $outfile $errfile && exit $status' 0
13
14../makeinfo -o /dev/null $srcdir/html-min.txi /nonexistent.texinfo \
15>$outfile 2>$errfile
16exit_status=$?
17
18# we expect one error message about /nonexistent.texinfo and bad exit status.
19test $exit_status -ne 0 \
20&& grep /nonexistent $errfile >/dev/null \
21&& exit_status=0
22
23exit $exit_status
24