From: John Darrington Date: Wed, 17 Dec 2003 06:03:19 +0000 (+0000) Subject: Added a test for the WEIGHT command X-Git-Tag: sav-api~2666 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bae7045326ba7e3294c29b2bfe56acd4b4b26ec;p=pspp Added a test for the WEIGHT command --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 4c9f3f647a..201a194657 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -18,6 +18,7 @@ TESTS = command/aggregate.sh \ command/sort.sh \ command/tabs.sh \ command/split-file.sh \ + command/weight.sh \ bugs/double-frequency.sh \ bugs/html-frequency.sh \ bugs/crosstabs.sh diff --git a/tests/command/weight.sh b/tests/command/weight.sh new file mode 100755 index 0000000000..35bbaa7782 --- /dev/null +++ b/tests/command/weight.sh @@ -0,0 +1,167 @@ +#!/bin/sh + +# This program tests .... + +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/weight.stat <