Hash :
d8efaeb3
Author :
Date :
2008-10-22T21:21:55
Let stderr output end up on fd 2 in testsuite. * tests/defs.in (AUTOMAKE_run): Output recorded stderr on file descriptor 2. * tests/getopt.test: Fix erroneous multiple redirection, uncovered by above change. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
#! /bin/sh
# Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Automake --help, and --version should have priority over any other option
# so that their `Exit 0' is coherent.
. ./defs || Exit 1
set -e
# This is expected to fail ...
AUTOMAKE_fails -Wnonexistent
grep ':.*nonexistent' stderr
# ... but this should not.
AUTOMAKE_run 0 -Wnonexistent --help
grep ':.*nonexistent' stderr && Exit 1
# Similarly, this should fail ...
AUTOMAKE_fails --nonexistent
grep ':.*nonexistent' stderr
# ... but this should not.
AUTOMAKE_run 0 --nonexistent --help
grep ':.*nonexistent' stderr && Exit 1
: