3 # Copyright (C) 2006-2007 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 [-tvCSOlp?V] [-f FILE] [-o[ARG]] [--test] [--file=FILE]
36 [--input=FILE] [--verbose] [--cantiga] [--sonet] [--option]
37 [--optional[=ARG]] [--limerick] [--poem] [--help] [--usage]
41 ./test-argp --usage | func_compare || ERR=1
44 # Test working usage-indent format
47 Usage: test-argp [-tvCSOlp?V] [-f FILE] [-o[ARG]] [--test] [--file=FILE]
48 [--input=FILE] [--verbose] [--cantiga] [--sonet] [--option] [--optional[=ARG]]
49 [--limerick] [--poem] [--help] [--usage] [--version] ARGS...
52 ARGP_HELP_FMT='usage-indent=0' ./test-argp --usage | func_compare || ERR=1
57 Usage: test-argp [OPTION...] ARGS...
64 -f, --file=FILE, --input=FILE Option with a mandatory argument
65 -v, --verbose Simple option without arguments
68 -C, --cantiga create a cantiga
69 -S, --sonet create a sonet
72 -O, --option An option
74 -o, --optional[=ARG] Option with an optional argument. ARG is one of
82 -l, --limerick create a limerick
83 -p, --poem create a poem
85 -?, --help give this help list
86 --usage give a short usage message
87 -V, --version print program version
89 Mandatory or optional arguments to long options are also mandatory or optional
90 for any corresponding short options.
95 ./test-argp --help | func_compare || ERR=1
98 # Test ambiguous option handling
100 ./test-argp --optio 2>/dev/null && ERR=1