| #! /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 2, 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 |
| |
| : |