[master] 52099d4 Don't append newline for varnishtest -p
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Thu Mar 23 15:38:06 CET 2017
commit 52099d46f7ac50b92be718d87bbfad32408d30c3
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Thu Mar 23 15:33:15 2017 +0100
Don't append newline for varnishtest -p
Original patch from @joshuaspence.
Closes #2262
diff --git a/bin/varnishtest/tests/r02262.vtc b/bin/varnishtest/tests/r02262.vtc
new file mode 100644
index 0000000..15ffe26
--- /dev/null
+++ b/bin/varnishtest/tests/r02262.vtc
@@ -0,0 +1,10 @@
+varnishtest "varnishtest -p"
+
+shell {
+cat >_.vtc <<EOF
+varnishtest -p
+varnish v1 -cliexpect 42 "param.show default_ttl"
+EOF
+
+exec varnishtest -v -t 5 -p default_ttl=42 _.vtc
+}
diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index 0158a6d..b84b40f 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -627,7 +627,7 @@ main(int argc, char * const *argv)
break;
case 'p':
VSB_printf(params_vsb, " -p ");
- VSB_quote(params_vsb, optarg, -1, VSB_QUOTE_NONL);
+ VSB_quote(params_vsb, optarg, -1, 0);
break;
case 'q':
if (vtc_verbosity > 0)
More information about the varnish-commit
mailing list