From 4ba38406b13edc6ca1c0465a3ae033ab6916e379 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sat, 10 Dec 2005 07:09:42 +0000 Subject: [PATCH] * test/det_descendant_report.sh: Add thorough test for the Detailed Descendant Report. svn: r5533 --- gramps2/ChangeLog | 2 + gramps2/test/det_descendant_report.sh | 68 +++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100755 gramps2/test/det_descendant_report.sh diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 87ec28bb9..3dfb2dde2 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -19,6 +19,8 @@ state for archive option. * test/det_ancestor_report.sh: Add thorough test for the Detailed Ancestor Report. + * test/det_descendant_report.sh: Add thorough test for the + Detailed Descendant Report. 2005-12-08 Don Allingham * src/Merge.py: fix date comparison diff --git a/gramps2/test/det_descendant_report.sh b/gramps2/test/det_descendant_report.sh new file mode 100755 index 000000000..c2d890a47 --- /dev/null +++ b/gramps2/test/det_descendant_report.sh @@ -0,0 +1,68 @@ +#! /bin/sh +# +# Report test for GRAMPS: Generate det_descendant_report testing +# different option combinations. + +# $Id$ + +REP="det_ancestor_report" +FMT="txt" + +TOP_DIR=`dirname $PWD` +TEST_DIR=$TOP_DIR/test +SRC_DIR=$TOP_DIR/src +PRG="python gramps.py" +EXAMPLE_XML=$TOP_DIR/example/gramps/example.gramps + +REP_DIR=$TEST_DIR/reports/$REP +mkdir -p $REP_DIR + +DATA_DIR=$TEST_DIR/data +mkdir -p $DATA_DIR +if [ -f $DATA_DIR/example.grdb ]; then + rm $DATA_DIR/example.grdb +fi + +echo "" +echo "+--------------------------------------------------------------" +echo "| Import XML, write GRDB" +echo "+--------------------------------------------------------------" +OPTS="-i $EXAMPLE_XML -o $DATA_DIR/example.grdb" +(cd $SRC_DIR; $PRG $OPTS) + +OPTS="-O $DATA_DIR/example.grdb" + +echo "" +echo "+--------------------------------------------------------------" +echo "| Text Report: "$REP +echo "| Text Format: "$FMT +echo "+--------------------------------------------------------------" +for desref in {0,1}; do +for incphotos in {0,1}; do +for omitda in {0,1}; do +for incsources in {0,1}; do +for usenick in {0,1}; do +for fulldates in {0,1}; do +for incnotes in {0,1}; do +for repplace in {0,1}; do +for repdate in {0,1}; do +for computeage in {0,1}; do +for incnames in {0,1}; do +for incevents in {0,1}; do +for listc in {0,1}; do + output="$desref$incphotos$omitda$incsources$usenick$fulldates$incnotes$repplace$repdate$computeage$incnames$incevents$listc" + action="-a report -p name=$REP,id=I44,off=$FMT,of=$REP_DIR/$output.$FMT,desref=$desref,incphotos=$incphotos,omitda=$omitda,incsources=$incsources,usenick=$usenick,fulldates=$fulldates,incnotes=$incnotes,repplace=$repplace,repdate=$repdate,computeage=$computeage,incnames=$incnames,incevents=$incevents,listc=$listc" + (cd $SRC_DIR; $PRG $OPTS $action) +done +done +done +done +done +done +done +done +done +done +done +done +done