tests/formats/wkday-in.sh \
tests/formats/wkday-out.sh \
tests/formats/360.sh \
- tests/bugs/case-map.sh \
tests/bugs/comment-at-eof.sh \
tests/bugs/compression.sh \
tests/bugs/curtailed.sh \
+++ /dev/null
-#!/bin/sh
-
-# This program tests for a bug which caused a crash when
-# a non-empty case_map was created in SAVE.
-
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
- if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
- echo "NOT cleaning $TEMPDIR"
- return ;
- fi
- cd /
- 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 <<EOF
-INPUT PROGRAM.
- COMPUTE #I = 1.
- COMPUTE X = #I.
- END CASE.
- END FILE.
-END INPUT PROGRAM.
-
-SAVE OUTFILE='tiny.sav'.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="run program"
-$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass;
])
AT_CLEANUP
+AT_SETUP([nonempty case_map doesn't crash])
+AT_DATA([save.sps], [dnl
+INPUT PROGRAM.
+ COMPUTE #I = 1.
+ COMPUTE X = #I + 1.
+ END CASE.
+ END FILE.
+END INPUT PROGRAM.
+
+SAVE OUTFILE='tiny.sav'.
+])
+AT_CHECK([pspp -O format=csv save.sps])
+AT_DATA([get.sps], [dnl
+GET FILE='tiny.sav'.
+LIST.
+])
+AT_CHECK([pspp -O format=csv get.sps], [0], [dnl
+Table: Data List
+X
+2.00
+])
+AT_CLEANUP
+
# Test that system files can be read properly, even when the case_size
# header value is -1 (Some 3rd party products do this).
AT_SETUP([system files with -1 case_size])