X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fopt%2Ftest%2Frun-correct-reporting.c;h=b51d53eb3faff7f0745db3514ac1764ed65adca1;hp=bbac3402dde35a70d12ff58dd1961377a791e5b3;hb=7e381e6c241957ff5840b1d8a0ab5f3bde6337c2;hpb=be6a5cdadeef4995cc935f2d2443f45f542ed125 diff --git a/ccan/opt/test/run-correct-reporting.c b/ccan/opt/test/run-correct-reporting.c index bbac3402..b51d53eb 100644 --- a/ccan/opt/test/run-correct-reporting.c +++ b/ccan/opt/test/run-correct-reporting.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "utils.h" int main(int argc, char *argv[]) @@ -11,7 +12,7 @@ int main(int argc, char *argv[]) plan_tests(12); /* --aaa without args. */ - opt_register_arg("-a/--aaa", test_arg, NULL, "aaa", ""); + opt_register_arg("-a|--aaa", test_arg, NULL, "aaa", ""); ok1(!parse_args(&argc, &argv, "--aaa", NULL)); ok1(strstr(err_output, ": --aaa: option requires an argument")); free(err_output); @@ -22,7 +23,7 @@ int main(int argc, char *argv[]) err_output = NULL; /* Multiple */ - opt_register_arg("--bbb/-b/-c/--ccc", test_arg, NULL, "aaa", ""); + opt_register_arg("--bbb|-b|-c|--ccc", test_arg, NULL, "aaa", ""); ok1(!parse_args(&argc, &argv, "--bbb", NULL)); ok1(strstr(err_output, ": --bbb: option requires an argument")); free(err_output);