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 export STAT_CONFIG_PATH=$top_srcdir/config
51 activity="create program"
53 DATA LIST LIST NOTABLE / X * variable001 * variable002 * variable003 * .
65 SAVE /OUTFILE='$TEMPDIR/foo.sav'
69 GET /FILE='$TEMPDIR/foo.sav'.
74 if [ $? -ne 0 ] ; then no_result ; fi
76 activity="run program"
77 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
78 if [ $? -ne 0 ] ; then no_result ; fi
80 activity="check file exists"
81 ls -l $TEMPDIR/foo.sav > /dev/null
82 if [ $? -ne 0 ] ; then no_result ; fi
84 # Ensure that the written file has no long name table
85 activity="check sysfile type"
86 grep 'X=X' $TEMPDIR/foo.sav
87 if [ $? -eq 0 ] ; then fail ; fi
89 activity="compare output"
90 diff -b -B -w $TEMPDIR/pspp.list - << EOF
91 X VARIABLE VARIAB_A VARIAB_B
92 -------- -------- -------- --------
103 if [ $? -ne 0 ] ; then fail ; fi