Add tests for the C-based API.

This commit is contained in:
Reece H. Dunn
2016-05-30 22:30:55 +01:00
parent 454038dbfa
commit e29d6b8b36
4 changed files with 195 additions and 6 deletions
+16 -5
View File
@@ -6,6 +6,7 @@ mimedir = $(xdgdatadir)/mime
xmldir = $(mimedir)/packages
AM_LDFLAGS = ${LTLIBINTL}
AM_CFLAGS = -Isrc/include -Isrc
AM_CXXFLAGS = -Isrc/include -Isrc
ACLOCAL_AMFLAGS = -I m4
@@ -113,19 +114,29 @@ src_libucd_la_SOURCES = \
############################# tests ###########################################
noinst_bin_PROGRAMS += tests/printucddata
tests_printucddata_SOURCES = tests/printucddata.cpp
tests_printucddata_SOURCES = tests/printucddata.c
tests_printucddata_LDADD = src/libucd.la
noinst_bin_PROGRAMS += tests/printucddata_cpp
tests_printucddata_cpp_SOURCES = tests/printucddata_cpp.cpp
tests_printucddata_cpp_LDADD = src/libucd.la
tests/unicode-data.expected: tools/printdata.py tools/ucd.py \
data/ucd/UnicodeData.txt \
data/ucd/PropList.txt \
data/ucd/Scripts.txt
tools/printdata.py ${UCD_ROOTDIR} ${UCD_FLAGS} > $@
tests/unicode-data.actual: tests/printucddata
tests/unicode-data-capi.actual: tests/printucddata
tests/printucddata > $@
tests/unicode-data.diff: tests/unicode-data.expected tests/unicode-data.actual
diff -U0 tests/unicode-data.expected tests/unicode-data.actual > tests/unicode-data.diff
tests/unicode-data-cppapi.actual: tests/printucddata_cpp
tests/printucddata_cpp > $@
check: tests/unicode-data.diff
tests/unicode-data-capi.diff: tests/unicode-data.expected tests/unicode-data-capi.actual
diff -U0 tests/unicode-data.expected tests/unicode-data-capi.actual > tests/unicode-data-capi.diff
tests/unicode-data-cppapi.diff: tests/unicode-data.expected tests/unicode-data-cppapi.actual
diff -U0 tests/unicode-data.expected tests/unicode-data-cppapi.actual > tests/unicode-data-cppapi.diff
check: tests/unicode-data-capi.diff tests/unicode-data-cppapi.diff