From 2d8fbab3accc90662e24dc7da4c7fceff1668313 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Tue, 17 Feb 2004 03:47:43 +0000 Subject: [PATCH] Added tests for the one sample and paired T-TEST commands --- tests/Makefile.am | 2 + tests/command/t-test-1s.sh | 100 +++++++++++++++++++++++++++++++ tests/command/t-test-pairs.sh | 108 ++++++++++++++++++++++++++++++++++ 3 files changed, 210 insertions(+) create mode 100755 tests/command/t-test-1s.sh create mode 100755 tests/command/t-test-pairs.sh diff --git a/tests/Makefile.am b/tests/Makefile.am index 702ccd27..5d4e7cd7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,6 +21,8 @@ TESTS = command/aggregate.sh \ command/sort.sh \ command/tabs.sh \ command/split-file.sh \ + command/t-test-1s.sh \ + command/t-test-pairs.sh \ command/weight.sh \ bugs/alpha-freq.sh \ bugs/double-frequency.sh \ diff --git a/tests/command/t-test-1s.sh b/tests/command/t-test-1s.sh new file mode 100755 index 00000000..cd1b4ad5 --- /dev/null +++ b/tests/command/t-test-1s.sh @@ -0,0 +1,100 @@ +#!/bin/sh + +# This program tests that the T-TEST /TESTVAL command works OK + +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/out.stat < $TEMPDIR/out.stat <