From: Ben Pfaff Date: Wed, 31 Mar 2004 06:11:10 +0000 (+0000) Subject: Add test for multipass procedure bug. X-Git-Tag: v0.4.0~293 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c323e138c54511b83051ec23543d92ac4630641d;p=pspp-builds.git Add test for multipass procedure bug. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index e065558f..c45621ae 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Tue Mar 30 22:10:08 2004 Ben Pfaff + + * Makefile.am: (TESTS) Add bugs/multipass.sh. + Mon Mar 29 15:25:09 2004 Ben Pfaff * Makefile.am: (TESTS) Add xforms/casefile.sh, diff --git a/tests/Makefile.am b/tests/Makefile.am index 2df0749e..d51bd44e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -37,6 +37,7 @@ TESTS = command/aggregate.sh \ bugs/html-frequency.sh \ bugs/crosstabs.sh \ bugs/data-crash.sh \ + bugs/multipass.sh \ bugs/random.sh \ bugs/t-test.sh \ bugs/temporary.sh \ diff --git a/tests/bugs/multipass.sh b/tests/bugs/multipass.sh new file mode 100755 index 00000000..00423547 --- /dev/null +++ b/tests/bugs/multipass.sh @@ -0,0 +1,92 @@ +#!/bin/sh + +# This program tests for a bug which caused UNIFORM(x) to always return zero. + + +TEMPDIR=/tmp/pspp-tst-$$ + +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 > $TEMPDIR/rnd.sps <