]> infiniteadaptability.org Git - seeder/commitdiff
...
authoralex <[email protected]>
Thu, 30 Dec 2021 20:27:03 +0000 (12:27 -0800)
committeralex <[email protected]>
Thu, 30 Dec 2021 20:27:03 +0000 (12:27 -0800)
test/unit/Makefile.am
test/unit/meta.tests.c
test/unit/test_utils.h

index dc6cc486e98f0edf9e423213389a5c1ac2584c0c..dd4f862cae4f16c3857af6882b014d631e62f721 100644 (file)
@@ -66,10 +66,12 @@ meta_tests_SOURCES = \
        meta.tests.c \
        $(top_srcdir)/src/fs/concat.c \
        $(top_srcdir)/src/fs/dir.c \
-       $(top_srcdir)/src/meta.c \
        $(top_srcdir)/src/rss/free.c \
        $(top_srcdir)/src/rss/init.c
 
+meta_tests_CPPFLAGS = $(AM_CPPFLAGS) \
+       -DMETA_SRC_FILE="$(top_srcdir)/src/meta.c"
+
 rss_tests_SOURCES = \
        $(common_SOURCES) \
        rss.tests.c \
index b1f17bdf7765aceac2b952ca732054932dc40158..f3c1348c8a7116ca6a27b19eed5f79bfa2d1c02f 100644 (file)
@@ -1,6 +1,10 @@
 #include<test_utils.h>
 
-#include<meta.h>
+char *strptime(const char *s, const char *format, struct tm *tm) {
+       return (char*)s;
+}
+
+#include INCLUDE(META_SRC_FILE)
 
 int main();
 static void meta_entry_basic_test();
index c7577b23ec350775d1a7e5d9ede3330c58119dcc..1cb13a32a263887871d5c314e4b91d1cb13b8e2d 100644 (file)
 #include<setup.h>
 #include<shutdown.h>
 
+#define __include(x) #x
+#define _include(x) __include(x)
+#define INCLUDE(x) _include(x)
+
 #define TEST_DIRECTORY PREFIX
 #define TEST_FILE_1 PREFIX "/test"
 #define TEST_FILE_1_CONTENTS "asldfkjaslkdfjalskdjf"