diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-04-29 12:04:15 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-04-29 12:04:15 +0000 |
commit | a7ebfd1caaa58b6a7bc0b1d1510b0255604e804a (patch) | |
tree | 12ce8266eae980eaef4bb03464f06c23ae0eb6c3 /tests | |
parent | a75a52bb4444c02d8dc70105d8c6865718a827a0 (diff) | |
download | gnulib-a7ebfd1caaa58b6a7bc0b1d1510b0255604e804a.tar.gz |
Update
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test-argp-2.sh | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/tests/test-argp-2.sh b/tests/test-argp-2.sh index 7d73f5ccd6..f5edede781 100755 --- a/tests/test-argp-2.sh +++ b/tests/test-argp-2.sh @@ -26,15 +26,16 @@ func_compare() { # 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 @@ -44,7 +45,7 @@ EOT 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 @@ -63,15 +64,24 @@ documentation string -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 @@ -89,6 +99,10 @@ EOT ./test-argp --optio 2>/dev/null && ERR=1 +#### +# Run built-in tests +./test-argp || ERR=1 + rm $TMP exit $ERR |