mirror of https://gitee.com/openkylin/libvirt.git
Disable some URI tests on older libxml2
Older versions of libxml2 could not correctly parse certain URIs. This causes test failures. There's nothing libvirt can do about this, so disable the problem tests on old libxml2 versions Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
6e09e7de89
commit
7c5752dd57
|
@ -182,19 +182,23 @@ mymain(void)
|
|||
{ (char*)"foo", (char*)"two", false },
|
||||
{ NULL, NULL, false },
|
||||
};
|
||||
#ifdef HAVE_XMLURI_QUERY_RAW
|
||||
virURIParam params3[] = {
|
||||
{ (char*)"foo", (char*)"&one", false },
|
||||
{ (char*)"bar", (char*)"&two", false },
|
||||
{ NULL, NULL, false },
|
||||
};
|
||||
#endif
|
||||
virURIParam params4[] = {
|
||||
{ (char*)"foo", (char*)"", false },
|
||||
{ NULL, NULL, false },
|
||||
};
|
||||
#ifdef HAVE_XMLURI_QUERY_RAW
|
||||
virURIParam params5[] = {
|
||||
{ (char*)"foo", (char*)"one two", false },
|
||||
{ NULL, NULL, false },
|
||||
};
|
||||
#endif
|
||||
virURIParam params6[] = {
|
||||
{ (char*)"foo", (char*)"one", false },
|
||||
{ NULL, NULL, false },
|
||||
|
@ -204,12 +208,16 @@ mymain(void)
|
|||
TEST_PARAMS("foo=one&foo=two", "", params2);
|
||||
TEST_PARAMS("foo=one&&foo=two", "foo=one&foo=two", params2);
|
||||
TEST_PARAMS("foo=one;foo=two", "foo=one&foo=two", params2);
|
||||
#ifdef HAVE_XMLURI_QUERY_RAW
|
||||
TEST_PARAMS("foo=%26one&bar=%26two", "", params3);
|
||||
#endif
|
||||
TEST_PARAMS("foo", "foo=", params4);
|
||||
TEST_PARAMS("foo=", "", params4);
|
||||
TEST_PARAMS("foo=&", "foo=", params4);
|
||||
TEST_PARAMS("foo=&&", "foo=", params4);
|
||||
#ifdef HAVE_XMLURI_QUERY_RAW
|
||||
TEST_PARAMS("foo=one%20two", "", params5);
|
||||
#endif
|
||||
TEST_PARAMS("=bogus&foo=one", "foo=one", params6);
|
||||
|
||||
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
|
|
Loading…
Reference in New Issue