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