mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
tests: append a newline to expected-output files lacking NL-at-EOF
* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Adjust the code that creates "actual" output, so that it too produces a newline-terminated buffer. * tests/qemuxml2argvdata/*.args: Append a newline to each, via: for i in $(find|grep '\.args$'); do echo >> $i;done
This commit is contained in:
parent
b3728d7d72
commit
efb8492b9d
@ -1,3 +1,12 @@
|
|||||||
|
Fri Aug 11 14:29:02 CEST 2008 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
|
tests: append a newline to expected-output files lacking NL-at-EOF
|
||||||
|
* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Adjust the
|
||||||
|
code that creates "actual" output, so that it too produces a
|
||||||
|
newline-terminated buffer.
|
||||||
|
* tests/qemuxml2argvdata/*.args: Append a newline to each, via:
|
||||||
|
for i in $(find|grep '\.args$'); do echo >> $i;done
|
||||||
|
|
||||||
Fri Aug 8 16:41:24 BST 2008 Daniel Berrange <berrange@redhat.com>
|
Fri Aug 8 16:41:24 BST 2008 Daniel Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* src/iptables.c, src/lxc_driver.c, src/openvz_driver.c,
|
* src/iptables.c, src/lxc_driver.c, src/openvz_driver.c,
|
||||||
|
@ -53,7 +53,7 @@ static int testCompareXMLToArgvFiles(const char *xml, const char *cmd, int extra
|
|||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
tmp = argv;
|
tmp = argv;
|
||||||
len = 0;
|
len = 1; /* for trailing newline */
|
||||||
while (*tmp) {
|
while (*tmp) {
|
||||||
len += strlen(*tmp) + 1;
|
len += strlen(*tmp) + 1;
|
||||||
tmp++;
|
tmp++;
|
||||||
@ -68,6 +68,7 @@ static int testCompareXMLToArgvFiles(const char *xml, const char *cmd, int extra
|
|||||||
strcat(actualargv, *tmp);
|
strcat(actualargv, *tmp);
|
||||||
tmp++;
|
tmp++;
|
||||||
}
|
}
|
||||||
|
strcat(actualargv, "\n");
|
||||||
|
|
||||||
if (STRNEQ(expectargv, actualargv)) {
|
if (STRNEQ(expectargv, actualargv)) {
|
||||||
virtTestDifference(stderr, expectargv, actualargv);
|
virtTestDifference(stderr, expectargv, actualargv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user