From 5abe94420528d3e107eceb0f3df073e8a1270191 Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Sat, 13 Dec 2025 09:37:21 -0700 Subject: make vis a single file build --- test/core/Makefile | 6 +++--- test/core/map-test.c | 2 +- test/core/text-test.c | 7 +++++-- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'test/core') diff --git a/test/core/Makefile b/test/core/Makefile index 4430cde..fc108f0 100644 --- a/test/core/Makefile +++ b/test/core/Makefile @@ -2,7 +2,7 @@ ALL = buffer-test map-test array-test text-test SRC = $(wildcard ccan/*/*.c) -CFLAGS += -I. -I../.. -DBUFFER_SIZE=4 -DBLOCK_SIZE=4 +CFLAGS += -Wno-unused-function -I. -I../.. -DBUFFER_SIZE=4 -DBLOCK_SIZE=4 test: $(ALL) @./buffer-test @@ -16,7 +16,7 @@ config.h: text-test: config.h text-test.c ../../text.c ../../text-common.c ../../text-io.c ../../text-iterator.c ../../text-util.c ../../text-motions.c ../../text-objects.c ../../text-regex.c ../../array.c @echo Compiling $@ binary - @${CC} ${CFLAGS} ${CFLAGS_STD} ${CFLAGS_EXTRA} ${filter %.c, $^} ${SRC} ${LDFLAGS} -o $@ + @${CC} ${CFLAGS} ${CFLAGS_STD} ${CFLAGS_EXTRA} text-test.c ${SRC} ${LDFLAGS} -o $@ buffer-test: config.h buffer-test.c ../../buffer.c @echo Compiling $@ binary @@ -24,7 +24,7 @@ buffer-test: config.h buffer-test.c ../../buffer.c map-test: config.h map-test.c ../../map.c @echo Compiling $@ binary - @${CC} ${CFLAGS} ${CFLAGS_STD} ${CFLAGS_EXTRA} ${filter %.c, $^} ${SRC} ${LDFLAGS} -o $@ + @${CC} ${CFLAGS} ${CFLAGS_STD} ${CFLAGS_EXTRA} map-test.c ${SRC} ${LDFLAGS} -o $@ array-test: config.h array-test.c ../../array.c @echo Compiling $@ binary diff --git a/test/core/map-test.c b/test/core/map-test.c index 06364e4..a8231a3 100644 --- a/test/core/map-test.c +++ b/test/core/map-test.c @@ -3,7 +3,7 @@ #include #include #include "tap.h" -#include "map.h" +#include "map.c" static bool get(Map *map, const char *key, const void *data) { return map_get(map, key) == data && map_closest(map, key) == data; diff --git a/test/core/text-test.c b/test/core/text-test.c index f6004c1..c69038c 100644 --- a/test/core/text-test.c +++ b/test/core/text-test.c @@ -6,10 +6,13 @@ #include #include #include "tap.h" -#include "text.h" -#include "text-util.h" + #include "util.h" +#include "array.c" +#include "buffer.c" +#include "text.c" + #ifndef BUFSIZ #define BUFSIZ 1024 #endif -- cgit v1.2.3