From: Ben Pfaff Date: Sat, 12 Feb 2005 07:28:49 +0000 (+0000) Subject: Add test for bug #11916. X-Git-Tag: v0.4.0~180 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60145c1c132f607c12b7880d5ee0092ce31889ac;p=pspp-builds.git Add test for bug #11916. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 63b1959a..5c7be719 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Fri Feb 11 23:27:08 2005 Ben Pfaff + + * bugs/crosstabs-crash: Add new test for Bug #11916. + Tue Jan 18 19:25:24 WST 2005 John Darrington * Canonicalised (some of) the tests' temp file names to make it diff --git a/tests/Makefile.am b/tests/Makefile.am index b211891b..75740471 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -48,6 +48,7 @@ TESTS = \ bugs/comment-at-eof.sh \ bugs/compute-fmt.sh \ bugs/crosstabs.sh \ + bugs/crosstabs-crash.sh \ bugs/curtailed.sh \ bugs/data-crash.sh \ bugs/double-frequency.sh \ diff --git a/tests/bugs/crosstabs-crash.sh b/tests/bugs/crosstabs-crash.sh new file mode 100755 index 00000000..db301560 --- /dev/null +++ b/tests/bugs/crosstabs-crash.sh @@ -0,0 +1,106 @@ +#!/bin/sh + +# This program tests for a bug which caused CROSSTABS to crash in +# integer mode. + +TEMPDIR=/tmp/pspp-tst-$$ +TESTFILE=$TEMPDIR/`basename $0`.sps + +here=`pwd`; + +# ensure that top_srcdir is absolute +cd $top_srcdir; top_srcdir=`pwd` + +export STAT_CONFIG_PATH=$top_srcdir/config + + +cleanup() +{ + rm -rf $TEMPDIR +} + + +fail() +{ + echo $activity + echo FAILED + cleanup; + exit 1; +} + + +no_result() +{ + echo $activity + echo NO RESULT; + cleanup; + exit 2; +} + +pass() +{ + cleanup; + exit 0; +} + +mkdir -p $TEMPDIR + +cd $TEMPDIR + +activity="create program" +cat > $TESTFILE <