X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=test-parse-options.c;h=acd1a2ba70fc2ffb38cd8fb0784aa6e5e693183f;hb=c89e32414516e906520e9bdd809560971eb52ef5;hp=efa734b42e38d7f5a98393cd69ac0ffe10160ffc;hpb=2cd9c2aff0d65bbce704a68d9cbe7a17e02257fe;p=git.git diff --git a/test-parse-options.c b/test-parse-options.c index efa734b42..acd1a2ba7 100644 --- a/test-parse-options.c +++ b/test-parse-options.c @@ -8,6 +8,7 @@ static int abbrev = 7; static int verbose = 0, dry_run = 0, quiet = 0; static char *string = NULL; static char *file = NULL; +static int ambiguous; static int length_callback(const struct option *opt, const char *arg, int unset) { @@ -59,6 +60,10 @@ int main(int argc, const char **argv) number_callback), { OPTION_BOOLEAN, '+', NULL, &boolean, NULL, "same as -b", PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_NODASH }, + { OPTION_BOOLEAN, 0, "ambiguous", &ambiguous, NULL, + "positive ambiguity", PARSE_OPT_NOARG | PARSE_OPT_NONEG }, + { OPTION_BOOLEAN, 0, "no-ambiguous", &ambiguous, NULL, + "negative ambiguity", PARSE_OPT_NOARG | PARSE_OPT_NONEG }, OPT_GROUP("Standard options"), OPT__ABBREV(&abbrev), OPT__VERBOSE(&verbose),