3 # Copyright (C) 2006 Free Software Foundation, Inc.
4 # This file is part of the GNUlib Library.
6 # This program 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)
11 # This program 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.
16 # You should have received a copy of the GNU General Public License along
17 # with this program; if not, write to the Free Software Foundation,
18 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
26 # If argp was compiled without base_name, it will display full program name
28 s,: [^ ]*/test-argp,: test-argp,
35 Usage: test-argp [-tvO?V] [-f FILE] [-o[ARG]] [--test] [--file=FILE]
36 [--input=FILE] [--verbose] [--optional[=ARG]] [--option] [--help]
37 [--usage] [--version] ARGS...
40 ./test-argp --usage | func_compare || ERR=1
43 # Test working usage-indent format
46 Usage: test-argp [-tvO?V] [-f FILE] [-o[ARG]] [--test] [--file=FILE]
47 [--input=FILE] [--verbose] [--optional[=ARG]] [--option] [--help] [--usage]
51 ARGP_HELP_FMT='usage-indent=0' ./test-argp --usage | func_compare || ERR=1
56 Usage: test-argp [OPTION...] ARGS...
63 -f, --file=FILE, --input=FILE Option with a mandatory argument
64 -v, --verbose Simple option without arguments
67 -o, --optional[=ARG] Option with an optional argument. ARG is one of
69 -O, --option An option
75 -?, --help give this help list
76 --usage give a short usage message
77 -V, --version print program version
79 Mandatory or optional arguments to long options are also mandatory or optional
80 for any corresponding short options.
85 ./test-argp --help | func_compare || ERR=1
88 # Test ambiguous option handling
90 ./test-argp --optio 2>/dev/null && ERR=1