summaryrefslogtreecommitdiff
path: root/tests/commandtest.c
diff options
context:
space:
mode:
authorPeter Krempa <pkrempa@redhat.com>2021-04-06 15:17:42 +0200
committerPeter Krempa <pkrempa@redhat.com>2021-04-12 15:55:10 +0200
commit1f61d7129fb8baa1b6c05967c141c75aa701dc67 (patch)
treebbb9a4da09af86d2666a23de42145022f3e0a24e /tests/commandtest.c
parente5124770db19acd17bc2af413c9c6169a6c2faf5 (diff)
downloadlibvirt-1f61d7129fb8baa1b6c05967c141c75aa701dc67.tar.gz
virCommandToStringFull: Improve linebreaking behaviour
Put multiple values for an option if followed by another option as used in certain iptables arguments. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Diffstat (limited to 'tests/commandtest.c')
-rw-r--r--tests/commandtest.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/commandtest.c b/tests/commandtest.c
index aaf391935c..81e9914860 100644
--- a/tests/commandtest.c
+++ b/tests/commandtest.c
@@ -997,6 +997,7 @@ static int test26(const void *unused G_GNUC_UNUSED)
"--oooh \\\n"
"-f \\\n"
"--wizz 'eek eek' \\\n"
+ "--m-m-m-multiarg arg arg2 \\\n"
"-w \\\n"
"-z \\\n"
"-l \\\n"
@@ -1009,7 +1010,9 @@ static int test26(const void *unused G_GNUC_UNUSED)
virCommandAddEnvPair(cmd, "A", "B");
virCommandAddEnvPair(cmd, "C", "D E");
virCommandAddArgList(cmd, "--foo", "bar", "--oooh", "-f",
- "--wizz", "eek eek", "-w", "-z", "-l",
+ "--wizz", "eek eek",
+ "--m-m-m-multiarg", "arg", "arg2",
+ "-w", "-z", "-l",
"--mmm", "flash", "bang", "wallop",
NULL);