mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05: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:
+1
-1
@@ -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)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
a
|
||||
@@ -0,0 +1 @@
|
||||
a
|
||||
@@ -0,0 +1 @@
|
||||
a --shell
|
||||
@@ -0,0 +1 @@
|
||||
-- --shell a
|
||||
@@ -0,0 +1 @@
|
||||
a
|
||||
@@ -0,0 +1 @@
|
||||
--shell a
|
||||
@@ -0,0 +1 @@
|
||||
hello
|
||||
@@ -0,0 +1,2 @@
|
||||
a A 0 + * ; . ' " / ? =
|
||||
< > &
|
||||
@@ -0,0 +1,2 @@
|
||||
a A 0 + '*' ';' . ''\''' '"' / '?' = ' ' '
|
||||
' '<' '>' '&'
|
||||
@@ -0,0 +1,2 @@
|
||||
a A 0 + * ; . ' " / ? =
|
||||
< > &
|
||||
@@ -0,0 +1 @@
|
||||
a b
|
||||
@@ -0,0 +1 @@
|
||||
a b
|
||||
@@ -0,0 +1 @@
|
||||
a b
|
||||
@@ -0,0 +1 @@
|
||||
a b
|
||||
@@ -0,0 +1 @@
|
||||
' " \;echo a
|
||||
@@ -0,0 +1 @@
|
||||
' " ;echo a
|
||||
@@ -0,0 +1,2 @@
|
||||
' " \
|
||||
a
|
||||
@@ -0,0 +1 @@
|
||||
' " \\
|
||||
@@ -0,0 +1,2 @@
|
||||
a
|
||||
b
|
||||
@@ -0,0 +1 @@
|
||||
a # b
|
||||
@@ -0,0 +1 @@
|
||||
a
|
||||
@@ -0,0 +1 @@
|
||||
a
|
||||
@@ -0,0 +1,2 @@
|
||||
a
|
||||
b
|
||||
@@ -0,0 +1,2 @@
|
||||
a
|
||||
b
|
||||
@@ -0,0 +1,2 @@
|
||||
a
|
||||
b
|
||||
@@ -0,0 +1,3 @@
|
||||
a
|
||||
\
|
||||
b
|
||||
@@ -0,0 +1 @@
|
||||
a
|
||||
@@ -0,0 +1,2 @@
|
||||
a
|
||||
c
|
||||
@@ -0,0 +1,2 @@
|
||||
a
|
||||
c
|
||||
@@ -0,0 +1 @@
|
||||
a # b
|
||||
Reference in New Issue
Block a user