From c38d7ad70f63084708e5bcb7d68c00ffdf9811e9 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 15 Nov 2017 23:01:32 +0200 Subject: Run fribidi-vs-unicode tests with make check --- fribidi-vs-unicode/Makefile.am | 11 ++++++++--- fribidi-vs-unicode/run.tests | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100755 fribidi-vs-unicode/run.tests diff --git a/fribidi-vs-unicode/Makefile.am b/fribidi-vs-unicode/Makefile.am index e24cc53..129b681 100644 --- a/fribidi-vs-unicode/Makefile.am +++ b/fribidi-vs-unicode/Makefile.am @@ -2,10 +2,15 @@ TESTS_ENVIRONMENT = \ srcdir=${srcdir}; export srcdir; \ top_builddir=${top_builddir}; export top_builddir; \ + builddir=${builddir}; export builddir; \ EXEEXT=${EXEEXT}; export EXEEXT; AM_TESTS_ENVIRONMENT = $(TESTS_ENVIRONMENT) +TEST_EXTENSIONS = .txt + +TXT_LOG_COMPILER = sh $(srcdir)/run.tests + AM_CPPFLAGS = \ -I$(top_builddir)/lib \ -I$(top_srcdir)/lib \ @@ -16,9 +21,9 @@ LDADD = $(top_builddir)/lib/libfribidi.la $(GLIB_LIBS) if FRIBIDI_USE_GLIB check_PROGRAMS = test test-character bin_PROGRAMS = $(check_PROGRAMS) -#TESTS = \ -# test \ -# test-character +TESTS = \ + BidiTest.txt \ + BidiCharacterTest.txt endif test_SOURCES = test.c diff --git a/fribidi-vs-unicode/run.tests b/fribidi-vs-unicode/run.tests new file mode 100755 index 0000000..13dcfa3 --- /dev/null +++ b/fribidi-vs-unicode/run.tests @@ -0,0 +1,20 @@ +#! /bin/sh + +test "x$srcdir" = x && srcdir=. +test "x$builddir" = x && builddir=. +test "x$top_builddir" = x && top_builddir=../.. + +test_bidi="$builddir/test$EXEEXT" +test_bidi_character="$builddir/test-character$EXEEXT" + +if test $# = 0; then + set /dev/stdin +fi + +for f in "$@"; do + if test "x$(basename $f)" = "xBidiTest.txt"; then + $test_bidi $f || exit 1 + else + $test_bidi_character $f || exit 1 + fi +done -- cgit v1.2.1