No good feature is complete without tests ;)
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Maybe I should squash all three patches into one?
tests/virshtest.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/virshtest.c b/tests/virshtest.c
index 7fb701d580..d77d3d81d4 100644
--- a/tests/virshtest.c
+++ b/tests/virshtest.c
@@ -411,6 +411,13 @@ mymain(void)
DO_TEST(34, "hello\n", "echo --str hello");
DO_TEST(35, "hello\n", "echo --hi");
+ /* Tests of multiple commands. */
+ DO_TEST(36, "a\nb\n", " echo a; echo b;");
+ DO_TEST(37, "a\nb\n", "\necho a\n echo b\n");
+ DO_TEST(38, "a\nb\n", "ec\\\nho a\n echo \\\n b;");
+ DO_TEST(39, "a\n b\n", "\"ec\\\nho\" a\n echo \"\\\n
b\";");
+ DO_TEST(40, "a\n\\\n b\n", "ec\\\nho a\n echo '\\\n
b';");
+
# undef DO_TEST
VIR_FREE(custom_uri);
--
2.20.1