mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
virshtest: Adapt 'echo --split' tests to DO_TEST_SCRIPT
Optimize invocation of the tests to share one 'virsh' binary as they don't influence each other. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
fdaf2ffb04
commit
7fca0d4d52
@ -682,16 +682,7 @@ mymain(void)
|
||||
DO_TEST(47, "a\n", "\\# ignored;echo a\n'#also' ignored");
|
||||
|
||||
/* test of splitting in vshStringToArray */
|
||||
DO_TEST(48, "a\nb,c,\nd,,e,,\nf,,,e\n",
|
||||
"-q", "echo", "--split", "a,b,,c,,,d,,,,e,,,,,f,,,,,,e");
|
||||
DO_TEST(49, "\na\nb,c,\nd,,e,,\nf,,,e\n\n",
|
||||
"-q", "echo", "--split", ",a,b,,c,,,d,,,,e,,,,,f,,,,,,e,");
|
||||
DO_TEST(50, ",a\nb,c,\nd,,e,,\nf,,,e,\n",
|
||||
"-q", "echo", "--split", ",,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,");
|
||||
DO_TEST(51, ",\na\nb,c,\nd,,e,,\nf,,,e,\n\n",
|
||||
"-q", "echo", "--split", ",,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,,");
|
||||
DO_TEST(52, ",,a\nb,c,\nd,,e,,\nf,,,e,,\n",
|
||||
"-q", "echo", "--split", ",,,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,,,");
|
||||
DO_TEST_SCRIPT("echo-split", NULL, VIRSH_DEFAULT, "-q");
|
||||
# undef DO_TEST
|
||||
|
||||
VIR_FREE(custom_uri);
|
||||
|
5
tests/virshtestdata/echo-split.in
Normal file
5
tests/virshtestdata/echo-split.in
Normal file
@ -0,0 +1,5 @@
|
||||
echo --split a,b,,c,,,d,,,,e,,,,,f,,,,,,e
|
||||
echo --split ,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,
|
||||
echo --split ,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,
|
||||
echo --split ,,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,,
|
||||
echo --split ,,,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,,,
|
24
tests/virshtestdata/echo-split.out
Normal file
24
tests/virshtestdata/echo-split.out
Normal file
@ -0,0 +1,24 @@
|
||||
a
|
||||
b,c,
|
||||
d,,e,,
|
||||
f,,,e
|
||||
|
||||
a
|
||||
b,c,
|
||||
d,,e,,
|
||||
f,,,e
|
||||
|
||||
,a
|
||||
b,c,
|
||||
d,,e,,
|
||||
f,,,e,
|
||||
,
|
||||
a
|
||||
b,c,
|
||||
d,,e,,
|
||||
f,,,e,
|
||||
|
||||
,,a
|
||||
b,c,
|
||||
d,,e,,
|
||||
f,,,e,,
|
Loading…
Reference in New Issue
Block a user