tests: make 'lzip.test' executable
[automake.git] / tests / automake.test
blobf8b4fef76d52a7795dc66228331411b508c6a55d
1 #! /bin/sh
2 # Copyright (C) 2004, 2006 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Test Automake's command-line options.
18 . ./defs || Exit 1
20 set -e
22 $AUTOMAKE --help
23 $AUTOMAKE --version
24 AUTOMAKE_fails --voo
25 grep 'unrecognized option.*--voo' stderr
26 # older perl has a buggy Getopt::Long which makes this fail.
27 if $PERL -e 'require 5.8.2;'; then
28 AUTOMAKE_fails -- --voo
29 grep 'input file.*--voo' stderr
31 AUTOMAKE_fails ''
32 grep 'empty argument' stderr
33 AUTOMAKE_fails -W
34 grep 'option.*-W.*requires an argument' stderr
35 AUTOMAKE_fails --warnings
36 grep 'option.*--warning.*requires an argument' stderr
37 AUTOMAKE_fails --warnings --help
38 grep 'unknown warning.*--help' stderr
39 AUTOMAKE_fails --ver
40 grep 'unrecognized option.*--ver' stderr
41 $AUTOMAKE --vers