| Line | |
|---|
| 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 |
|
|---|
| 7 | unset TEXINFO_OUTPUT
|
|---|
| 8 | : ${srcdir=.}
|
|---|
| 9 |
|
|---|
| 10 | outfile=outfile
|
|---|
| 11 | errfile=errfile
|
|---|
| 12 | trap 'status=$?; rm -f $outfile $errfile && exit $status' 0
|
|---|
| 13 |
|
|---|
| 14 | ../makeinfo -o /dev/null $srcdir/html-min.txi /nonexistent.texinfo \
|
|---|
| 15 | >$outfile 2>$errfile
|
|---|
| 16 | exit_status=$?
|
|---|
| 17 |
|
|---|
| 18 | # we expect one error message about /nonexistent.texinfo and bad exit status.
|
|---|
| 19 | test $exit_status -ne 0 \
|
|---|
| 20 | && grep /nonexistent $errfile >/dev/null \
|
|---|
| 21 | && exit_status=0
|
|---|
| 22 |
|
|---|
| 23 | exit $exit_status
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.