X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fopt%2Ftest%2Frun-usage.c;h=9d448dc460b7cf6db90ff398ac0558138bfc51c1;hb=7e381e6c241957ff5840b1d8a0ab5f3bde6337c2;hp=60df988c97bdcb6f2163aad172723740dbabf094;hpb=b23be29f01f22bba07b8cb8bcb41dab92180f219;p=ccan-lca-2011.git diff --git a/ccan/opt/test/run-usage.c b/ccan/opt/test/run-usage.c index 60df988..9d448dc 100644 --- a/ccan/opt/test/run-usage.c +++ b/ccan/opt/test/run-usage.c @@ -21,13 +21,13 @@ int main(int argc, char *argv[]) plan_tests(38); opt_register_table(subtables, NULL); - opt_register_noarg("--kkk/-k", my_cb, NULL, "magic kkk option"); + opt_register_noarg("--kkk|-k", my_cb, NULL, "magic kkk option"); opt_register_noarg("-?", opt_usage_and_exit, "...", "This message"); output = opt_usage("my name", "ExTrA Args"); diag("%s", output); ok1(strstr(output, "Usage: my name")); - ok1(strstr(output, "--jjj/-j/--lll/-l ")); + ok1(strstr(output, "--jjj|-j|--lll|-l ")); ok1(strstr(output, "ExTrA Args")); ok1(strstr(output, "-a ")); ok1(strstr(output, " Description of a\n")); @@ -38,21 +38,21 @@ int main(int argc, char *argv[]) ok1(strstr(output, "--eee ")); ok1(strstr(output, " (default: eee)\n")); ok1(strstr(output, "long table options:\n")); - ok1(strstr(output, "--ggg/-g ")); + ok1(strstr(output, "--ggg|-g ")); ok1(strstr(output, " Description of ggg\n")); - ok1(strstr(output, "-h/--hhh ")); + ok1(strstr(output, "-h|--hhh ")); ok1(strstr(output, " Description of hhh\n")); - ok1(strstr(output, "--kkk/-k")); + ok1(strstr(output, "--kkk|-k")); ok1(strstr(output, "magic kkk option")); /* This entry is hidden. */ - ok1(!strstr(output, "--mmm/-m")); + ok1(!strstr(output, "--mmm|-m")); free(output); /* NULL should use string from registered options. */ output = opt_usage("my name", NULL); diag("%s", output); ok1(strstr(output, "Usage: my name")); - ok1(strstr(output, "--jjj/-j/--lll/-l ")); + ok1(strstr(output, "--jjj|-j|--lll|-l ")); ok1(strstr(output, "...")); ok1(strstr(output, "-a ")); ok1(strstr(output, " Description of a\n")); @@ -63,14 +63,14 @@ int main(int argc, char *argv[]) ok1(strstr(output, "--eee ")); ok1(strstr(output, " (default: eee)\n")); ok1(strstr(output, "long table options:\n")); - ok1(strstr(output, "--ggg/-g ")); + ok1(strstr(output, "--ggg|-g ")); ok1(strstr(output, " Description of ggg\n")); - ok1(strstr(output, "-h/--hhh ")); + ok1(strstr(output, "-h|--hhh ")); ok1(strstr(output, " Description of hhh\n")); - ok1(strstr(output, "--kkk/-k")); + ok1(strstr(output, "--kkk|-k")); ok1(strstr(output, "magic kkk option")); /* This entry is hidden. */ - ok1(!strstr(output, "--mmm/-m")); + ok1(!strstr(output, "--mmm|-m")); free(output); return exit_status();