3 # This program's primary purpose is to test the FILE HANDLE command
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
10 # ensure that top_srcdir is absolute
11 cd $top_srcdir; top_srcdir=`pwd`
13 STAT_CONFIG_PATH=$top_srcdir/config
14 export STAT_CONFIG_PATH
51 activity="create file"
52 cat > $TEMPDIR/wiggle.txt << EOF
58 if [ $? -ne 0 ] ; then no_result ; fi
62 activity="create program"
63 cat > $TESTFILE << EOF
64 FILE HANDLE myhandle /NAME='$TEMPDIR/wiggle.txt'.
65 DATA LIST LIST FILE=myhandle /x *.
68 if [ $? -ne 0 ] ; then no_result ; fi
70 activity="run program"
71 $SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TESTFILE
72 if [ $? -ne 0 ] ; then no_result ; fi
75 activity="compare output"
76 diff -b $TEMPDIR/pspp.list - << EOF
77 1.1 DATA LIST. Reading free-form data from file $TEMPDIR/wiggle.txt.
92 if [ $? -ne 0 ] ; then fail ; fi