[master] 3e10a62 Add a --optstring long options to VUTs
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Oct 30 16:10:09 UTC 2017
commit 3e10a62331ff854715f664c18ca1901205df3915
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue Sep 26 14:59:09 2017 +0200
Add a --optstring long options to VUTs
This is similar to `varnishd -x optstring`.
Refs dc5fe3b
diff --git a/lib/libvarnishapi/vut.c b/lib/libvarnishapi/vut.c
index 1438195..61b5a2f 100644
--- a/lib/libvarnishapi/vut.c
+++ b/lib/libvarnishapi/vut.c
@@ -212,6 +212,10 @@ VUT_Init(const char *progname, int argc, char * const *argv,
exit(vut_synopsis(voc));
if (argc == 2 && !strcmp(argv[1], "--options"))
exit(vut_options(voc));
+ if (argc == 2 && !strcmp(argv[1], "--optstring")) {
+ (void)printf("%s\n", voc->vopt_optstring);
+ exit(0);
+ }
vut->progname = progname;
vut->g_arg = VSL_g_vxid;
More information about the varnish-commit
mailing list