mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
virshtest: Don't use both '--xml' and '--shell' for 'virsh echo'
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@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a52a201c22
commit
c67fc3ea82
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user