3 # This program tests that the rename command works properly
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 program"
53 DATA LIST LIST /brakeFluid * y * .
63 RENAME VARIABLES (brakeFluid=applecarts).
67 SAVE /OUTFILE='$TEMPDIR/rename.sav'.
69 if [ $? -ne 0 ] ; then no_result ; fi
72 activity="run program"
73 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
74 if [ $? -ne 0 ] ; then no_result ; fi
76 activity="check sysfile"
77 grep -i Brake $TEMPDIR/rename.sav
78 if [ $? -eq 0 ] ; then fail ; fi
80 activity="compare output"
81 perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
82 diff -b $TEMPDIR/pspp.list - <<EOF | perl -e 's/^\s*$//g'
83 1.1 DATA LIST. Reading free-form data from the command file.
106 if [ $? -ne 0 ] ; then fail ; fi