summaryrefslogtreecommitdiff
path: root/makeinfo/tests/twofiles
diff options
context:
space:
mode:
Diffstat (limited to 'makeinfo/tests/twofiles')
-rwxr-xr-xmakeinfo/tests/twofiles23
1 files changed, 23 insertions, 0 deletions
diff --git a/makeinfo/tests/twofiles b/makeinfo/tests/twofiles
new file mode 100755
index 0000000..22c477c
--- /dev/null
+++ b/makeinfo/tests/twofiles
@@ -0,0 +1,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