3 # This program tests that system files can be read and written
4 # without the long name tables.
7 TEMPDIR=/tmp/pspp-tst-$$
8 TESTFILE=$TEMPDIR/`basename $0`.sps
12 # ensure that top_srcdir is absolute
13 cd $top_srcdir; top_srcdir=`pwd`
15 STAT_CONFIG_PATH=$top_srcdir/config
16 export STAT_CONFIG_PATH
53 activity="create program"
55 DATA LIST LIST NOTABLE / X * variable001 * variable002 * variable003 * .
67 SAVE /OUTFILE='$TEMPDIR/foo.sav'
71 GET /FILE='$TEMPDIR/foo.sav'.
76 if [ $? -ne 0 ] ; then no_result ; fi
78 activity="run program"
79 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
80 if [ $? -ne 0 ] ; then no_result ; fi
82 activity="check file exists"
83 ls -l $TEMPDIR/foo.sav > /dev/null
84 if [ $? -ne 0 ] ; then no_result ; fi
86 # Ensure that the written file has no long name table
87 activity="check sysfile type"
88 grep 'X=X' $TEMPDIR/foo.sav
89 if [ $? -eq 0 ] ; then fail ; fi
91 activity="compare output"
92 diff -b -B -w $TEMPDIR/pspp.list - << EOF
93 X VARIABLE VARIAB_A VARIAB_B
94 -------- -------- -------- --------
105 if [ $? -ne 0 ] ; then fail ; fi