(case_compare) Implement as delegating to case_compare_2dict().
[pspp-builds.git] / tests / command / import-export.sh
index 3cf262a442368415f81bd998fb7e49fe39c274a5..4476fa7df4cee45b675509311a4e5302761792aa 100755 (executable)
@@ -3,17 +3,20 @@
 # This program tests the IMPORT and EXPORT commands
 
 TEMPDIR=/tmp/pspp-tst-$$
+TESTFILE=$TEMPDIR/`basename $0`.sps
 
 here=`pwd`;
 
 # ensure that top_srcdir is absolute
 cd $top_srcdir; top_srcdir=`pwd`
 
-export STAT_CONFIG_PATH=$top_srcdir/config
+STAT_CONFIG_PATH=$top_srcdir/config
+export STAT_CONFIG_PATH
 
 
 cleanup()
 {
+     cd /
      rm -rf $TEMPDIR
 }
 
@@ -46,8 +49,8 @@ mkdir -p $TEMPDIR
 cd $TEMPDIR
 
 activity="create program"
-cat > $TEMPDIR/prog.stat <<EOF
-DATA LIST LIST /x * y *.
+cat > $TESTFILE <<EOF
+DATA LIST LIST /X * Y *.
 BEGIN DATA.
 1 2
 3 4
@@ -66,11 +69,11 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TEMPDIR/prog.stat
+$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-diff $TEMPDIR/pspp.list - << EOF
+diff -b -B $TEMPDIR/pspp.list - << EOF
 1.1 DATA LIST.  Reading free-form data from the command file.
 +--------+------+
 |Variable|Format|