mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
virshtest: Test against output files ("echo" tests)
Managing output files is much simpler especially with VIR_TEST_REGENERATE_OUTPUT compared to putting the expected string blobs into the C source file. For now the output is tested both against the hardcoded strings as well as the output files. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c63b5ee98b
commit
d15b79a35c
@ -585,7 +585,7 @@ mymain(void)
|
||||
do { \
|
||||
const char *testname = testname_; \
|
||||
const char *myargv[] = { __VA_ARGS__, NULL }; \
|
||||
const struct testInfo info = { NULL, NULL, myargv, result }; \
|
||||
const struct testInfo info = { testname, NULL, myargv, result }; \
|
||||
if (virTestRun(testname, testCompare, &info) < 0) \
|
||||
ret = -1; \
|
||||
} while (0)
|
||||
|
1
tests/virshtestdata/dash-dash-argument-1.out
Normal file
1
tests/virshtestdata/dash-dash-argument-1.out
Normal file
@ -0,0 +1 @@
|
||||
a
|
1
tests/virshtestdata/dash-dash-argument-2.out
Normal file
1
tests/virshtestdata/dash-dash-argument-2.out
Normal file
@ -0,0 +1 @@
|
||||
a
|
1
tests/virshtestdata/dash-dash-argument-3.out
Normal file
1
tests/virshtestdata/dash-dash-argument-3.out
Normal file
@ -0,0 +1 @@
|
||||
a --shell
|
1
tests/virshtestdata/dash-dash-argument-4.out
Normal file
1
tests/virshtestdata/dash-dash-argument-4.out
Normal file
@ -0,0 +1 @@
|
||||
-- --shell a
|
1
tests/virshtestdata/dash-dash-argument-5.out
Normal file
1
tests/virshtestdata/dash-dash-argument-5.out
Normal file
@ -0,0 +1 @@
|
||||
a
|
1
tests/virshtestdata/dash-dash-argument-6.out
Normal file
1
tests/virshtestdata/dash-dash-argument-6.out
Normal file
@ -0,0 +1 @@
|
||||
--shell a
|
1
tests/virshtestdata/echo-alias-argv.out
Normal file
1
tests/virshtestdata/echo-alias-argv.out
Normal file
@ -0,0 +1 @@
|
||||
hello
|
2
tests/virshtestdata/echo-escaping-1.out
Normal file
2
tests/virshtestdata/echo-escaping-1.out
Normal file
@ -0,0 +1,2 @@
|
||||
a A 0 + * ; . ' " / ? =
|
||||
< > &
|
2
tests/virshtestdata/echo-escaping-2.out
Normal file
2
tests/virshtestdata/echo-escaping-2.out
Normal file
@ -0,0 +1,2 @@
|
||||
a A 0 + '*' ';' . ''\''' '"' / '?' = ' ' '
|
||||
' '<' '>' '&'
|
2
tests/virshtestdata/echo-escaping-3.out
Normal file
2
tests/virshtestdata/echo-escaping-3.out
Normal file
@ -0,0 +1,2 @@
|
||||
a A 0 + * ; . ' " / ? =
|
||||
< > &
|
1
tests/virshtestdata/echo-quote-removal-1.out
Normal file
1
tests/virshtestdata/echo-quote-removal-1.out
Normal file
@ -0,0 +1 @@
|
||||
a b
|
1
tests/virshtestdata/echo-quote-removal-2.out
Normal file
1
tests/virshtestdata/echo-quote-removal-2.out
Normal file
@ -0,0 +1 @@
|
||||
a b
|
1
tests/virshtestdata/echo-quote-removal-3.out
Normal file
1
tests/virshtestdata/echo-quote-removal-3.out
Normal file
@ -0,0 +1 @@
|
||||
a b
|
1
tests/virshtestdata/echo-quote-removal-4.out
Normal file
1
tests/virshtestdata/echo-quote-removal-4.out
Normal file
@ -0,0 +1 @@
|
||||
a b
|
1
tests/virshtestdata/echo-quote-removal-5.out
Normal file
1
tests/virshtestdata/echo-quote-removal-5.out
Normal file
@ -0,0 +1 @@
|
||||
' " \;echo a
|
1
tests/virshtestdata/echo-quote-removal-6.out
Normal file
1
tests/virshtestdata/echo-quote-removal-6.out
Normal file
@ -0,0 +1 @@
|
||||
' " ;echo a
|
2
tests/virshtestdata/echo-quote-removal-7.out
Normal file
2
tests/virshtestdata/echo-quote-removal-7.out
Normal file
@ -0,0 +1,2 @@
|
||||
' " \
|
||||
a
|
1
tests/virshtestdata/echo-quote-removal-8.out
Normal file
1
tests/virshtestdata/echo-quote-removal-8.out
Normal file
@ -0,0 +1 @@
|
||||
' " \\
|
2
tests/virshtestdata/multiple-commands-1.out
Normal file
2
tests/virshtestdata/multiple-commands-1.out
Normal file
@ -0,0 +1,2 @@
|
||||
a
|
||||
b
|
1
tests/virshtestdata/multiple-commands-10.out
Normal file
1
tests/virshtestdata/multiple-commands-10.out
Normal file
@ -0,0 +1 @@
|
||||
a # b
|
1
tests/virshtestdata/multiple-commands-11.out
Normal file
1
tests/virshtestdata/multiple-commands-11.out
Normal file
@ -0,0 +1 @@
|
||||
a
|
1
tests/virshtestdata/multiple-commands-12.out
Normal file
1
tests/virshtestdata/multiple-commands-12.out
Normal file
@ -0,0 +1 @@
|
||||
a
|
2
tests/virshtestdata/multiple-commands-2.out
Normal file
2
tests/virshtestdata/multiple-commands-2.out
Normal file
@ -0,0 +1,2 @@
|
||||
a
|
||||
b
|
2
tests/virshtestdata/multiple-commands-3.out
Normal file
2
tests/virshtestdata/multiple-commands-3.out
Normal file
@ -0,0 +1,2 @@
|
||||
a
|
||||
b
|
2
tests/virshtestdata/multiple-commands-4.out
Normal file
2
tests/virshtestdata/multiple-commands-4.out
Normal file
@ -0,0 +1,2 @@
|
||||
a
|
||||
b
|
3
tests/virshtestdata/multiple-commands-5.out
Normal file
3
tests/virshtestdata/multiple-commands-5.out
Normal file
@ -0,0 +1,3 @@
|
||||
a
|
||||
\
|
||||
b
|
1
tests/virshtestdata/multiple-commands-6.out
Normal file
1
tests/virshtestdata/multiple-commands-6.out
Normal file
@ -0,0 +1 @@
|
||||
a
|
2
tests/virshtestdata/multiple-commands-7.out
Normal file
2
tests/virshtestdata/multiple-commands-7.out
Normal file
@ -0,0 +1,2 @@
|
||||
a
|
||||
c
|
2
tests/virshtestdata/multiple-commands-8.out
Normal file
2
tests/virshtestdata/multiple-commands-8.out
Normal file
@ -0,0 +1,2 @@
|
||||
a
|
||||
c
|
1
tests/virshtestdata/multiple-commands-9.out
Normal file
1
tests/virshtestdata/multiple-commands-9.out
Normal file
@ -0,0 +1 @@
|
||||
a # b
|
Loading…
Reference in New Issue
Block a user