twofiles 688 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. # $Id: twofiles,v 1.4 2010-12-04 00:05:54 karl Exp $
  3. # Public domain. Test that an existing and nonexisting file doesn't cause a
  4. # segmentation fault.
  5. # Report from: Arkadiusz Miskiewicz, 15 Feb 2003 13:22:49 +0100.
  6. unset TEXINFO_OUTPUT LANG LANGUAGE
  7. LC_ALL=POSIX; export LC_ALL
  8. : ${srcdir=.}
  9. outfile=outfile
  10. errfile=errfile
  11. trap 'status=$?; rm -f $outfile $errfile && exit $status' 0
  12. ../makeinfo -o /dev/null $srcdir/html-min.txi /nonexistent.texinfo \
  13. >$outfile 2>$errfile
  14. exit_status=$?
  15. # we expect one error message about /nonexistent.texinfo and bad exit status.
  16. test $exit_status -ne 0 \
  17. && grep /nonexistent $errfile >/dev/null \
  18. && exit_status=0
  19. exit $exit_status