From fd9c6b1847662285b5b6ee2a3eb450ce27faba51 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Fri, 1 Nov 2002 08:38:39 +0000 Subject: [PATCH] Don't let bogus.test depend on a file that can change. --- t/bogus.test | 2 +- t/input/bogus.ged | 37 +++++++++++++++++++++++++++++++++++++ t/output/bogus.ref | 6 +++--- 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 t/input/bogus.ged diff --git a/t/bogus.test b/t/bogus.test index 221b84a..2bb4110 100755 --- a/t/bogus.test +++ b/t/bogus.test @@ -1,6 +1,6 @@ #!/bin/sh -cp $srcdir/Makefile.am bogus.ged +cp $srcdir/input/bogus.ged bogus.ged $srcdir/src/test_script -2 -b minimal.ged bogus 0 result=$? rm bogus.ged diff --git a/t/input/bogus.ged b/t/input/bogus.ged new file mode 100644 index 0000000..0182fcc --- /dev/null +++ b/t/input/bogus.ged @@ -0,0 +1,37 @@ +## Process this file with automake to produce Makefile.in +# $Id$ +# $Name$ + +SUBDIRS=src input output . + +DMALLOC_LOG = dmalloc.log +TESTS := $(wildcard $(srcdir)/*.test) + +EXTRA_DIST=$(TESTS) + +TESTS_ENVIRONMENT=ICONV_PATH=@ICONV_PATH@ + +all-local: + @rm -f *.out $(DMALLOC_LOG) + +check-% : %.test all-local + @srcdir=$(srcdir); export srcdir; \ + if $(TESTS_ENVIRONMENT) ./$<; then \ + echo "Test succeeded"; \ + else \ + echo "Test failed"; \ + fi + +check-dmalloc-%: %.test all-local + @if [ "@EXTRA_PROGS@" = "" ]; then \ + echo "Please run './configure --with-dmalloc' first"; \ + exit; \ + fi; \ + srcdir=$(srcdir); export srcdir; \ + GOM_DMALLOC_TEST=$(DMALLOC_LOG); export GOM_DMALLOC_TEST; \ + if $(TESTS_ENVIRONMENT) ./$<; then \ + echo "Test succeeded"; \ + else \ + echo "Test failed"; \ + fi + diff --git a/t/output/bogus.ref b/t/output/bogus.ref index fbb0691..bfe8b8f 100644 --- a/t/output/bogus.ref +++ b/t/output/bogus.ref @@ -3,9 +3,9 @@ WARNING: Warning on line 1: Unknown encoding, falling back to one-byte ERROR: Error: parse error ERROR: Error: GEDCOM level number is 2 higher than previous -ERROR: Error on line 1: '@' character should be written as '@@' in values -ERROR: Error on line 1: '@' character should be written as '@@' in values -ERROR: Error on line 1: '@' character should be written as '@@' in values +ERROR: Error on line 2: '@' character should be written as '@@' in values +ERROR: Error on line 2: '@' character should be written as '@@' in values +ERROR: Error on line 2: '@' character should be written as '@@' in values === Parsing file minimal.ged Header start -- 2.30.2