3 # This program tests the DATA LIST input program.
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
8 # ensure that top_builddir are absolute
9 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
10 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
11 top_builddir=`cd $top_builddir; pwd`
13 # ensure that top_srcdir is absolute
14 top_srcdir=`cd $top_srcdir; pwd`
16 STAT_CONFIG_PATH=$top_srcdir/config
17 export STAT_CONFIG_PATH
54 # Create command file.
55 activity="create program"
56 cat > $TESTFILE << EOF
57 data list list ('|','X') /A B C D.
66 data list free/A B C D.
83 data list free (tab)/A B C D.
104 if [ $? -ne 0 ] ; then no_result ; fi
107 activity="run program"
108 $SUPERVISOR $top_builddir/src/pspp --testing-mode -o raw-ascii --testing-mode $TESTFILE
109 if [ $? -ne 0 ] ; then fail ; fi
111 activity="compare output"
112 perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
113 diff -b $TEMPDIR/pspp.list - << EOF
114 1.1 DATA LIST. Reading free-form data from INLINE.
124 -------- -------- -------- --------
125 1.00 23.00 45.00 2.03
126 2.00 22.00 34.00 23.00
127 3.00 34.00 34.00 34.00
129 -------- -------- -------- --------
137 -------- -------- -------- --------
155 if [ $? -ne 0 ] ; then fail ; fi