&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);
ASSERT (q_value == NULL);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
- ASSERT (optind = 1);
+ ASSERT (optind == 1);
}
/* Check that the '+' flag has to come first. */
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);
}
{
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);
}