1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-17 12:41:05 +03:00
Files
gnulib/doc/glibc-functions
Eric Blake 3c8bb39bef test-getopt: test stderr behavior
Portions of this commit are commented out because they tickle
glibc bugs.  For a real-life example of the bug:

$ env -ua -:
env: invalid option -- :
Try `env --help' for more information.
$ env -:
env: invalid option -- :
Try `env --help' for more information.
$ env -+
env: invalid option -- +
Try `env --help' for more information.
$ env -ua -+
Try `env --help' for more information.

Notice that when -+ is not given as the first argument, the
error message is mistakenly suppressed.

* modules/getopt-posix-tests (Depends-on): Add dup2.
* tests/test-getopt.c (ASSERT): Avoid stderr.
(main): Move stderr to a temporary file.
* tests/test-getopt.h (getopt_loop): No longer manipulate opterr.
Instead, add parameter to inform caller if output occurred.
(test_getopt): Adjust all tests to expect silence, and add new
tests of leading ":".
* doc/glibc-functions/getopt_long.texi (getopt_long): Document
glibc shortcomings with leading "-:" or "+:" in optstring.
* doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
Likewise.
* doc/posix-functions/getopt.texi (getopt): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-12-22 06:44:00 -07:00
..
2009-08-25 02:17:09 +02:00
2008-12-15 07:05:41 -07:00
2008-12-15 07:05:41 -07:00
2009-08-24 00:17:47 +02:00
2008-10-18 14:17:41 +02:00
2008-12-15 07:05:41 -07:00
2008-12-15 07:05:41 -07:00
2008-12-16 00:13:22 +01:00
2008-12-16 00:13:22 +01:00
2008-10-07 08:32:09 +02:00
2008-12-16 00:13:22 +01:00
2008-12-15 07:05:41 -07:00
2008-12-16 00:13:22 +01:00
2008-12-16 00:13:22 +01:00
2008-10-18 14:17:41 +02:00
2008-10-05 16:54:22 +02:00
2008-12-15 07:05:41 -07:00
2008-10-18 14:17:41 +02:00
2008-10-18 14:17:41 +02:00
2008-05-19 14:02:31 +02:00
2008-10-18 14:17:41 +02:00
2008-12-16 00:13:22 +01:00
2008-10-23 16:38:01 +02:00
2008-07-12 11:27:14 -07:00
2008-10-18 14:17:41 +02:00
2008-10-18 14:17:41 +02:00
2008-12-16 00:13:22 +01:00
2008-12-16 00:13:22 +01:00
2008-12-16 00:13:22 +01:00
2008-12-16 00:13:22 +01:00
2008-12-16 00:13:22 +01:00
2008-10-18 14:17:41 +02:00
2008-10-18 14:17:41 +02:00
2009-08-23 14:11:27 +02:00
2009-11-04 19:09:01 -07:00
2009-08-22 18:50:21 +02:00
2008-12-15 07:05:41 -07:00
2008-12-15 07:05:41 -07:00
2008-10-23 16:38:01 +02:00
2008-12-15 07:05:41 -07:00
2008-12-16 00:13:22 +01:00
2008-12-15 07:05:41 -07:00
2008-12-15 07:05:41 -07:00
2008-12-15 07:05:41 -07:00
2008-12-15 07:05:41 -07:00
2008-10-18 14:17:41 +02:00
2008-12-15 07:05:41 -07:00
2008-10-23 16:38:01 +02:00
2008-12-16 00:13:22 +01:00
2008-10-23 16:38:01 +02:00
2008-10-18 14:17:41 +02:00
2008-10-18 14:17:41 +02:00
2008-10-18 14:17:41 +02:00
2008-10-18 14:17:41 +02:00