diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index cd82b5c4e..87ec28bb9 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -17,6 +17,8 @@ to path when this options is turned on/off; (parse_style_frame): save archive option as an integer; (setup_html_frame): set the state for archive option. + * test/det_ancestor_report.sh: Add thorough test for the Detailed + Ancestor Report. 2005-12-08 Don Allingham * src/Merge.py: fix date comparison diff --git a/gramps2/test/det_ancestor_report.sh b/gramps2/test/det_ancestor_report.sh new file mode 100755 index 000000000..c85ed6e94 --- /dev/null +++ b/gramps2/test/det_ancestor_report.sh @@ -0,0 +1,69 @@ +#! /bin/sh +# +# Report test for GRAMPS: Generate det_ancesto_report testing +# different option combinations. + +# $Id$ + +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/det_ancestor_report +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" + +REP="det_ancestor_report" +FMT="txt" + +# Single run with all textual reports in all formats +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=$TEXT_REP,id=I44,off=$FMT,of=$REP/$output.$FMT,desref=$desref,incphotos=$incphotos,omitda=$omitda,incources=$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