TESTS_ENVIRONMENT += EXEEXT=$(EXEEXT)
dist_TESTS = \
- tests/command/file-handle.sh \
tests/command/filter.sh \
tests/command/get-data-txt.sh \
tests/command/get-data-txt-examples.sh \
tests/language/data-io/add-files.at \
tests/language/data-io/data-list.at \
tests/language/data-io/data-reader.at \
+ tests/language/data-io/file-handle.at \
tests/language/data-io/save.at \
tests/language/data-io/save-translate.at \
tests/language/dictionary/attributes.at \
+++ /dev/null
-#!/bin/sh
-
-# This program's primary purpose is to test the FILE HANDLE command
-
-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 file"
-cat > $TEMPDIR/wiggle.txt << EOF
-1
-2
-5
-109
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-
-activity="create program"
-cat > $TESTFILE << EOF
-FILE HANDLE myhandle /NAME='$TEMPDIR/wiggle.txt'.
-DATA LIST LIST FILE=myhandle /x *.
-LIST.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="run program"
-$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="compare output"
-diff -c $TEMPDIR/pspp.csv - << EOF
-Table: Reading free-form data from myhandle.
-Variable,Format
-x,F8.0
-
-Table: Data List
-x
-1.00
-2.00
-5.00
-109.00
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-pass;
--- /dev/null
+AT_BANNER([FILE HANDLE])
+
+AT_SETUP([FILE HANDLE])
+AT_DATA([wiggle.txt], [dnl
+1
+2
+5
+109
+])
+AT_DATA([file-handle.sps], [dnl
+FILE HANDLE myhandle /NAME='wiggle.txt'.
+DATA LIST LIST FILE=myhandle /x *.
+LIST.
+])
+AT_CHECK([pspp -O format=csv file-handle.sps], [0], [dnl
+Table: Reading free-form data from myhandle.
+Variable,Format
+x,F8.0
+
+Table: Data List
+x
+1.00
+2.00
+5.00
+109.00
+])
+AT_CLEANUP
+