[PATCH 3/1] virsh: Test batch mode parser improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No good feature is complete without tests ;)

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux