From 90f253fadc1019174d23cd7b62489c3a84e90c3e Mon Sep 17 00:00:00 2001 From: Mike Lowis Date: Wed, 5 Oct 2016 11:35:26 -0400 Subject: [PATCH] Fixed unit test build by adding an empty test suite for utf-8. This will eventually contain tests for the utf-8 encoder/decoder --- Makefile | 4 ++-- tests/tests.c | 1 + tests/utf8.c | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 tests/utf8.c diff --git a/Makefile b/Makefile index 840f74b..a02d568 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ LDFLAGS = -L/opt/X11/lib -lX11 -lXft CFLAGS = --std=c99 -Wall -Wextra -I. -I/opt/X11/include -I/opt/local/include/freetype2 -I/usr/include/freetype2 SRCS = xedit.c buf.c screen.c utf8.c OBJS = $(SRCS:.c=.o) -TESTSRCS = tests/tests.c tests/buf.c +TESTSRCS = tests/tests.c tests/buf.c tests/utf8.c TESTOBJS = $(TESTSRCS:.c=.o) all: edit test @@ -17,7 +17,7 @@ unittests: $(TESTOBJS) $(CC) -o $@ $^ $(LDFLAGS) clean: - $(RM) edit unittests $(OBJS) $(TESTOBJS) + $(RM) edit unittests xedit.o $(OBJS) $(TESTOBJS) $(OBJS): edit.h Makefile diff --git a/tests/tests.c b/tests/tests.c index d1465d6..051ab35 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -4,5 +4,6 @@ int main(int argc, char** argv) { atf_init(argc,argv); RUN_EXTERN_TEST_SUITE(BufferTests); + RUN_EXTERN_TEST_SUITE(Utf8Tests); return atf_print_results(); } diff --git a/tests/utf8.c b/tests/utf8.c new file mode 100644 index 0000000..7f969e1 --- /dev/null +++ b/tests/utf8.c @@ -0,0 +1,5 @@ +#include "atf.h" +#include "../utf8.c" + +TEST_SUITE(Utf8Tests) { +} -- 2.49.0