X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-getopt_long.h;h=0e58fecbb868bbe497add61ef1622dedb15b5e6a;hb=61c96af09d3d2c917c69b17cc827e28a280db66c;hp=5f103c8e41bf2aab1162df3758d0f57617cc7c10;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/tests/test-getopt_long.h b/tests/test-getopt_long.h index 5f103c8e4..0e58fecbb 100644 --- a/tests/test-getopt_long.h +++ b/tests/test-getopt_long.h @@ -1151,8 +1151,7 @@ test_getopt_long (void) &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); - /* glibc bug http://sources.redhat.com/bugzilla/show_bug.cgi?id=11041 */ - /* ASSERT (p_value == NULL); */ + ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); @@ -2079,8 +2078,11 @@ test_getopt_long_only (void) opterr = 0; c = do_getopt_long_only (argc, argv, "ab", long_options_required, &option_index); - /* glibc bug http://sources.redhat.com/bugzilla/show_bug.cgi?id=11041 */ - /* ASSERT (c == 1003); */ + /* glibc getopt_long_only is intentionally different from + getopt_long when handling a prefix that is common to two + spellings, when both spellings have the same option directives. + BSD getopt_long_only treats both cases the same. */ + ASSERT (c == 1003 || c == '?'); ASSERT (optind == 2); } { @@ -2096,8 +2098,11 @@ test_getopt_long_only (void) opterr = 0; c = do_getopt_long_only (argc, argv, "abx::", long_options_required, &option_index); - /* glibc bug http://sources.redhat.com/bugzilla/show_bug.cgi?id=11041 */ - /* ASSERT (c == 1003); */ + /* glibc getopt_long_only is intentionally different from + getopt_long when handling a prefix that is common to two + spellings, when both spellings have the same option directives. + BSD getopt_long_only treats both cases the same. */ + ASSERT (c == 1003 || c == '?'); ASSERT (optind == 2); ASSERT (optarg == NULL); }