]> git.mdlowis.com Git - proto/labwc.git/commitdiff
tests: avoid fontconfig ASAN warnings
authorJohan Malm <jgm323@gmail.com>
Mon, 7 Sep 2020 19:14:46 +0000 (20:14 +0100)
committerJohan Malm <jgm323@gmail.com>
Mon, 7 Sep 2020 19:14:46 +0000 (20:14 +0100)
tests/meson.build
tests/t1000-rcxml-simple-parse.c
tests/t1001-rcxml-nodenames-simple.c

index f5584f267075187e0527b267bb183d4f5c480e98..3175a90fdaaae4b6e0890fb69bd9d6d101462cbd 100644 (file)
@@ -22,7 +22,7 @@ foreach t : rcxml_tests
   exe = executable(
     testname,
     sources: [t, 'tap.c'],
-    dependencies: [wlroots],
+    dependencies: [wlroots, cairo, pangocairo],
     include_directories: [labwc_inc],
     link_with: [rcxml_lib],
   )
index e4eef60a1ded425df69b5ce665e56bfba575eab2..f6fdfd8f066738d85982ee359ace4441ba85ade5 100644 (file)
@@ -3,6 +3,8 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdbool.h>
+#include <cairo.h>
+#include <pango/pangocairo.h>
 
 #include "config/rcxml.h"
 #include "tap.h"
@@ -34,5 +36,6 @@ int main(int argc, char **argv)
        ok1(rc.client_side_decorations);
 
        rcxml_finish();
+       pango_cairo_font_map_set_default(NULL);
        return exit_status();
 }
index d371ddee4026a8dbb5758f2dbc4f815c66844663..c9aee4ccd91c15b358b0b5a511e4029c2fb99101 100644 (file)
@@ -4,6 +4,8 @@
 #include <stdarg.h>
 #include <stdbool.h>
 #include <string.h>
+#include <cairo.h>
+#include <pango/pangocairo.h>
 
 #include "config/rcxml.h"
 #include "tap.h"
@@ -43,5 +45,6 @@ int main(int argc, char **argv)
        ok1(!strcmp(expect, actual.buf));
        free(actual.buf);
        free(source.buf);
+       pango_cairo_font_map_set_default(NULL);
        return exit_status();
 }