Escaping for both shell and XML makes no sense. Use one at time so that
we can forbid use of both.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tests/virshtest.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tests/virshtest.c b/tests/virshtest.c
index 53db2aa19a..07c27428ae 100644
--- a/tests/virshtest.c
+++ b/tests/virshtest.c
@@ -432,9 +432,8 @@ mymain(void)
DO_TEST(15, "a A 0 + * ; . ' " / ? = \n < >
&\n",
"echo", "--xml", "a", "A",
"0", "+", "*", ";", ".",
"'", "\"",
"/", "?", "=", " ", "\n",
"<", ">", "&");
- DO_TEST(16, "a A 0 + '*' ';' . '''
'"' / '?' = ' ' '\n' '<'"
- " '>' '&'\n",
- "echo", "--shell", "--xml", "a",
"A", "0", "+", "*", ";", ".",
"'",
+ DO_TEST(16, "a A 0 + '*' ';' . ''\\'''
'\"' / '?' = ' ' '\n' '<' '>'
'&'\n",
+ "echo", "--shell", "a", "A",
"0", "+", "*", ";", ".",
"\'",
"\"", "/", "?", "=", "
", "\n", "<", ">", "&");
DO_TEST(17, "\n",
"echo", "");
@@ -443,7 +442,7 @@ mymain(void)
DO_TEST(19, "\n",
"echo", "--xml", "");
DO_TEST(20, "''\n",
- "echo", "--xml", "--shell", "");
+ "echo", "--shell", "");
DO_TEST(21, "\n",
"echo ''");
DO_TEST(22, "''\n",
@@ -451,7 +450,7 @@ mymain(void)
DO_TEST(23, "\n",
"echo --xml ''");
DO_TEST(24, "''\n",
- "echo --xml --shell \"\"''");
+ "echo --shell \"\"''");
/* Tests of -- handling. */
DO_TEST(25, "a\n",
--
2.31.1