+2007-04-29 Sergey Poznyakoff <gray@gnu.org.ua>
+
+ * lib/argp-help.c (hol_cluster_cmp): Reverse comparison. Change
+ proposed by Sven Verdoolaege.
+
+ * tests/test-argp.c: Fix option ordering. Test deeply clustered
+ options.
+ * tests/test-argp-2.sh (func_compare): Use diff instead of
+ cmp. Change proposed by Bruno Haible
+ (usage and help tests): Update
+
2007-04-29 Bruno Haible <bruno@clisp.org>
* tests/test-fflush.c (main): Use a file of size 17, not 10.
# If argp was compiled without base_name, it will display full program name
sed '1{
s,: [^ ]*/test-argp,: test-argp,
- }' | diff -c $TMP -
+ }' | diff -pu $TMP -
}
####
# Test --usage output
cat > $TMP <<EOT
-Usage: test-argp [-tvO?V] [-f FILE] [-o[ARG]] [--test] [--file=FILE]
- [--input=FILE] [--verbose] [--optional[=ARG]] [--option] [--help]
- [--usage] [--version] ARGS...
+Usage: test-argp [-tvCSOlp?V] [-f FILE] [-o[ARG]] [--test] [--file=FILE]
+ [--input=FILE] [--verbose] [--cantiga] [--sonet] [--option]
+ [--optional[=ARG]] [--limerick] [--poem] [--help] [--usage]
+ [--version] ARGS...
EOT
./test-argp --usage | func_compare || ERR=1
cat > $TMP <<EOT
Usage: test-argp [-tvO?V] [-f FILE] [-o[ARG]] [--test] [--file=FILE]
-[--input=FILE] [--verbose] [--optional[=ARG]] [--option] [--help] [--usage]
+[--input=FILE] [--verbose] [--option] [--optional[=ARG]] [--help] [--usage]
[--version] ARGS...
EOT
-f, --file=FILE, --input=FILE Option with a mandatory argument
-v, --verbose Simple option without arguments
+ Option Group 1.1
+ -C, --cantiga create a cantiga
+ -S, --sonet create a sonet
+
Option Group 2
+ -O, --option An option
+
-o, --optional[=ARG] Option with an optional argument. ARG is one of
the following:
- -O, --option An option
many many units
one one unit
two two units
+ Option Group 2.1
+ -l, --limerick create a limerick
+ -p, --poem create a poem
+
-?, --help give this help list
--usage give a short usage message
-V, --version print program version
./test-argp --optio 2>/dev/null && ERR=1
+####
+# Run built-in tests
+./test-argp || ERR=1
+
rm $TMP
exit $ERR