diff options
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | Makefile.am | 15 | ||||
-rwxr-xr-x | configure.ac | 2 | ||||
-rw-r--r-- | test3-data/02.answer | 5 | ||||
-rwxr-xr-x | testit.sh | 18 |
5 files changed, 31 insertions, 10 deletions
@@ -1,4 +1,5 @@ 1.17 -> 2.0: + - devzero2000: add test3 to the unit test, add color-tests automake option - devzero2000: add tdict to the unit test: augment make check with some tdict tests - devzero2000: add test2 to the unit test: augment make check with some test2 tests - devzero2000: fix: add missing automake per target test* LDFLAGS diff --git a/Makefile.am b/Makefile.am index 97a6aef..aaef452 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,14 +9,19 @@ EXTRA_DIST = lookup3.c autogen.sh CHANGES \ footer_no_timestamp.html libpopt.vers \ $(TESTS) test-poptrc\ popt.xcodeproj/project.pbxproj \ - popt.ps Doxyfile + popt.ps Doxyfile test3-data/01.answer \ + test3-data/01.input \ + test3-data/02.answer \ + test3-data/02.input \ + test3-data/03.answer \ + test3-data/03.input SUBDIRS = po . auto noinst_HEADERS = poptint.h system.h -check_PROGRAMS = test1 test2 tdict +check_PROGRAMS = test1 test2 tdict test3 check_SCRIPTS = $(TESTS) @@ -24,15 +29,19 @@ check_SCRIPTS = $(TESTS) test1_CPPFLAGS = -I $(top_builddir) test2_CPPFLAGS = -I $(top_builddir) tdict_CPPFLAGS = -I $(top_builddir) +test3_CPPFLAGS = -I $(top_builddir) test1_CFLAGS = $(AM_CFLAGS) test2_CFLAGS = $(AM_CFLAGS) tdict_CFLAGS = $(AM_CFLAGS) +test3_CFLAGS = $(AM_CFLAGS) test1_LDFLAGS = $(AM_LDFLAGS) test2_LDFLAGS = $(AM_LDFLAGS) tdict_LDFLAGS = $(AM_LDFLAGS) +test3_LDFLAGS = $(AM_LDFLAGS) test1_LDADD = $(top_builddir)/$(usrlib_LTLIBRARIES) test2_LDADD = $(top_builddir)/$(usrlib_LTLIBRARIES) tdict_LDADD = $(top_builddir)/$(usrlib_LTLIBRARIES) +test3_LDADD = $(top_builddir)/$(usrlib_LTLIBRARIES) TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) MUDFLAP_OPTIONS="$(MUDFLAP_OPTIONS)" testpoptrc="$(top_srcdir)/test-poptrc" PATH=.:../src:$$PATH \ $(VALGRIND_ENVIRONMENT) \ @@ -64,7 +73,7 @@ distclean-local: rm -rf .ccache clean-local: - rm -rf doxygen *.gcda *.gcno lcov-result popt-valgrind-result + rm -rf doxygen *.gcda *.gcno lcov-result popt-valgrind-result if HAVE_SPLINT lint: diff --git a/configure.ac b/configure.ac index c0e2a6b..c29eeb9 100755 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4]) # Must come before AM_INIT_AUTOMAKE. AC_CONFIG_AUX_DIR([build-aux]) AC_CANONICAL_HOST -AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign]) +AM_INIT_AUTOMAKE([1.11 color-tests -Wall -Werror foreign]) # # Checks for programs. # Set common system defines for POSIX extensions, such as GNU_SOURCE diff --git a/test3-data/02.answer b/test3-data/02.answer index 309011a..07364db 100644 --- a/test3-data/02.answer +++ b/test3-data/02.answer @@ -1 +1,4 @@ -cannot parse test3-data/02.input. ret=-18 +single string: ' --xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' + @@ -54,10 +54,10 @@ run_diff() { } builddir=`pwd` -srcdir=$builddir +#srcdir=$builddir cd ${srcdir} test1=${builddir}/test1 -echo "Running tests in `pwd`" +echo "Running tests in $builddir" #make -q testcases ################### @@ -535,9 +535,17 @@ fi # End tdict test ################### -#run_diff test3 "test3 - 51" test3-data/01.input test3-data/01.answer -#run_diff test3 "test3 - 52" test3-data/02.input test3-data/02.answer -#run_diff test3 "test3 - 53" test3-data/03.input test3-data/03.answe +################### +# Begin test3 test +################### + +run_diff test3 "test3 - 1" $srcdir/test3-data/01.input $srcdir/test3-data/01.answer +run_diff test3 "test3 - 2" $srcdir/test3-data/02.input $srcdir/test3-data/02.answer +run_diff test3 "test3 - 3" $srcdir/test3-data/03.input $srcdir/test3-data/03.answer + +################### +# End test3 test +################### # If called from VALGRIND_ENVIRONMENT [ -s $builddir/popt-valgrind-result ] && { echo "Some test fail under Valgrind. Check $builddir/popt-valgrind-result" && exit 1 ; } |