summaryrefslogtreecommitdiff
path: root/test/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'test/Makefile.am')
-rw-r--r--test/Makefile.am19
1 files changed, 16 insertions, 3 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 2dde7d6..67b5d1e 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -3,19 +3,25 @@ lib_onig = ../src/libonig.la
AM_LDFLAGS = -L$(prefix)/lib
AM_CFLAGS = -Wall -Wno-invalid-source-encoding
-AM_CPPFLAGS = -I$(top_srcdir)/src -I$(includedir)
+AM_CPPFLAGS = -I$(top_srcdir)/src
+if ENABLE_POSIX_API
TESTS = test_utf8 testc testp testcu
+else
+TESTS = test_utf8 testc testcu
+endif
-check_PROGRAMS = test_utf8 testc testp testcu
+check_PROGRAMS = $(TESTS)
-test: test_uchar test_utf8 testc testp testcu
+test: test_uchar $(TESTS)
@echo "[Oniguruma API, UTF-8 check]"
@./test_utf8 | grep RESULT
@echo "[Oniguruma API, ASCII/EUC-JP check]"
@./testc | grep RESULT
+if ENABLE_POSIX_API
@echo "[POSIX API, ASCII/EUC-JP check]"
@./testp | grep RESULT
+endif
@echo "[Oniguruma API, UTF-16 check]"
@./testcu | grep RESULT
@@ -37,3 +43,10 @@ testp_CFLAGS = -DPOSIX_TEST -Wall -Wno-invalid-source-encoding
testcu_SOURCES = testu.c
testcu_LDADD = $(lib_onig)
+
+
+gcov:
+ make CFLAGS="--coverage" test_utf8
+ make CFLAGS="--coverage" testc
+ make CFLAGS="--coverage" testp
+ make CFLAGS="--coverage" testcu