getopt-gnu: add another test
authorEric Blake <ebb9@byu.net>
Tue, 6 Oct 2009 20:29:13 +0000 (14:29 -0600)
committerEric Blake <ebb9@byu.net>
Wed, 7 Oct 2009 03:37:36 +0000 (21:37 -0600)
commit497ec25b4164fcf4b8a68a41f28e27cb1030c441
tree89c30a04845eefa65a83f7466f854f34f2df6812
parent09e22b5a16b5cd926d75dd9e052b6b2188981df5
getopt-gnu: add another test

Ensure that POSIXLY_CORRECT does not interfere with optional argument
behavior; older BSD implementations botched this.

* tests/test-getopt_long.h (test_getopt_long_posix): New test, to
guarantee behavior relied on by m4.
* tests/test-getopt.c (main): Use it.
* modules/getopt-posix-tests (Depends-on): Add setenv.
See http://lists.gnu.org/archive/html/bug-m4/2006-09/msg00028.html.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
modules/getopt-posix-tests
tests/test-getopt.c
tests/test-getopt_long.h