diff options
Diffstat (limited to 'src/unittests/utils')
-rw-r--r-- | src/unittests/utils/dumplibs.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/unittests/utils/dumplibs.cc b/src/unittests/utils/dumplibs.cc index e7b68e470..5273f0b5e 100644 --- a/src/unittests/utils/dumplibs.cc +++ b/src/unittests/utils/dumplibs.cc @@ -38,6 +38,11 @@ PRAGMA48(GCC diagnostic pop) #include <zlib.h> +#ifdef ENABLE_LIBXML +#include <libxml/threads.h> +#include <libxml/xmlversion.h> +#endif // ENABLE_LIBXML + #include "debug.h" TEST_CASE("dumplibs tests", "") @@ -49,6 +54,17 @@ TEST_CASE("dumplibs tests", "") REQUIRE(build == link); } +#ifdef ENABLE_LIBXML + SECTION("libxml2") + { + const char **xmlVersion = __xmlParserVersion(); + REQUIRE(xmlVersion != nullptr); + REQUIRE(*xmlVersion != nullptr); + REQUIRE(std::string(*xmlVersion) == + std::string(LIBXML_VERSION_STRING LIBXML_VERSION_EXTRA)); + } +#endif // ENABLE_LIBXML + SECTION("sdl") { const SDL_version *linkVersion = nullptr; |