2844 |
21 Sep 12 |
peter |
#! /bin/sh |
2844 |
21 Sep 12 |
peter |
# $Id$ |
2844 |
21 Sep 12 |
peter |
3 |
# |
4207 |
26 Aug 22 |
peter |
# Copyright (C) 2012, 2013, 2022 Peter Johansson |
2844 |
21 Sep 12 |
peter |
5 |
# |
2844 |
21 Sep 12 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
2844 |
21 Sep 12 |
peter |
7 |
# |
2844 |
21 Sep 12 |
peter |
# The yat library is free software; you can redistribute it |
2844 |
21 Sep 12 |
peter |
# and/or modify it under the terms of the GNU General Public License as |
2844 |
21 Sep 12 |
peter |
# published by the Free Software Foundation; either version 3 of the |
2844 |
21 Sep 12 |
peter |
# License, or (at your option) any later version. |
2844 |
21 Sep 12 |
peter |
12 |
# |
2844 |
21 Sep 12 |
peter |
# The yat library is distributed in the hope that it will be useful, |
2844 |
21 Sep 12 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2844 |
21 Sep 12 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2844 |
21 Sep 12 |
peter |
# General Public License for more details. |
2844 |
21 Sep 12 |
peter |
17 |
# |
2844 |
21 Sep 12 |
peter |
# You should have received a copy of the GNU General Public License |
2844 |
21 Sep 12 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
2844 |
21 Sep 12 |
peter |
20 |
|
2844 |
21 Sep 12 |
peter |
21 |
|
2844 |
21 Sep 12 |
peter |
# test that ./prog --no-foo aborts as expected |
2844 |
21 Sep 12 |
peter |
23 |
|
2844 |
21 Sep 12 |
peter |
24 |
set -e |
2844 |
21 Sep 12 |
peter |
25 |
|
3036 |
03 Jun 13 |
peter |
26 |
. test/init.sh || exit 99 |
2844 |
21 Sep 12 |
peter |
27 |
|
4153 |
09 Mar 22 |
peter |
28 |
run ../../stdopt 1 --no-foo |
2844 |
21 Sep 12 |
peter |
29 |
grep foo stderr || exit_fail |
2844 |
21 Sep 12 |
peter |
30 |
test -e stdout || exit_fail |
2844 |
21 Sep 12 |
peter |
31 |
test -s stdout && exit_fail |
2844 |
21 Sep 12 |
peter |
32 |
|
2844 |
21 Sep 12 |
peter |
33 |
exit_success |