LIST: Remove WEIGHT subcommand.
[pspp-builds.git] / tests / command / list.sh
index 80be418af34e83a7edef8a80240c483fec799e92..57eea9d450c11c8f4731f3ee48037a51cab1ff4f 100755 (executable)
@@ -5,17 +5,27 @@
 TEMPDIR=/tmp/pspp-tst-$$
 TESTFILE=$TEMPDIR/`basename $0`.sps
 
-here=`pwd`;
+# ensure that top_builddir  are absolute
+if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
+if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
+top_builddir=`cd $top_builddir; pwd`
+PSPP=$top_builddir/src/ui/terminal/pspp
 
 # ensure that top_srcdir is absolute
-cd $top_srcdir; top_srcdir=`pwd`
+top_srcdir=`cd $top_srcdir; pwd`
 
 STAT_CONFIG_PATH=$top_srcdir/config
 export STAT_CONFIG_PATH
 
+LANG=C
+export LANG
 
 cleanup()
 {
+     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
+       echo "NOT cleaning $TEMPDIR" 
+       return ; 
+     fi
      cd /
      rm -rf $TEMPDIR
 }
@@ -56,7 +66,7 @@ data list file='$top_srcdir/tests/weighting.data'/AVAR 1-5 BVAR 6-10.
 weight by BVAR.
 list.
 *list /cases=from 5 to 20 by 2 /format numbered.
-list /format numbered weight.
+list /format numbered.
 
 *** Multiple lines.
 data list file='$top_srcdir/tests/list.data' notable /X000 to X126 1-127.
@@ -68,14 +78,14 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP --testing-mode $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare results"
 perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
 diff -b  $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading 1 record from file $top_srcdir/tests/weighting.data.
+1.1 DATA LIST.  Reading 1 record from "$top_srcdir/tests/weighting.data".
 +--------+------+-------+------+
 |Variable|Record|Columns|Format|
 #========#======#=======#======#