1 | #! /bin/sh
|
---|
2 | # Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
---|
3 | #
|
---|
4 | # This file is part of GNU Automake.
|
---|
5 | #
|
---|
6 | # GNU Automake is free software; you can redistribute it and/or modify
|
---|
7 | # it under the terms of the GNU General Public License as published by
|
---|
8 | # the Free Software Foundation; either version 2, or (at your option)
|
---|
9 | # any later version.
|
---|
10 | #
|
---|
11 | # GNU Automake is distributed in the hope that it will be useful,
|
---|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | # GNU General Public License for more details.
|
---|
15 | #
|
---|
16 | # You should have received a copy of the GNU General Public License
|
---|
17 | # along with Automake; see the file COPYING. If not, write to
|
---|
18 | # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
---|
19 | # Boston, MA 02110-1301, USA.
|
---|
20 |
|
---|
21 | # Test Automake's command-line options.
|
---|
22 | . ./defs || exit 1
|
---|
23 |
|
---|
24 | set -e
|
---|
25 |
|
---|
26 | $AUTOMAKE --help
|
---|
27 | $AUTOMAKE --version
|
---|
28 | AUTOMAKE_fails --voo
|
---|
29 | grep 'unrecognized option.*--voo' stderr
|
---|
30 | # older perl has a buggy Getopt::Long which makes this fail.
|
---|
31 | if $PERL -e 'require 5.8.2;'; then
|
---|
32 | AUTOMAKE_fails -- --voo
|
---|
33 | grep 'input file.*--voo' stderr
|
---|
34 | fi
|
---|
35 | AUTOMAKE_fails ''
|
---|
36 | grep 'empty argument' stderr
|
---|
37 | AUTOMAKE_fails -W
|
---|
38 | grep 'option.*-W.*requires an argument' stderr
|
---|
39 | AUTOMAKE_fails --warnings
|
---|
40 | grep 'option.*--warning.*requires an argument' stderr
|
---|
41 | AUTOMAKE_fails --warnings --help
|
---|
42 | grep 'unknown warning.*--help' stderr
|
---|
43 | AUTOMAKE_fails --ver
|
---|
44 | grep 'unrecognized option.*--ver' stderr
|
---|
45 | $AUTOMAKE --vers
|
---|