3 # This program tests the SYSFILE INFO command
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
50 activity="create program 1"
51 cat > $TEMPDIR/save.stat << EOF
63 if [ $? -ne 0 ] ; then no_result ; fi
65 activity="run program 1"
66 $SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TEMPDIR/save.stat
67 if [ $? -ne 0 ] ; then no_result ; fi
69 activity="create program 2"
70 cat > $TEMPDIR/read.stat << EOF
71 sysfile info file='foo.save'.
75 if [ $? -ne 0 ] ; then no_result ; fi
77 activity="run program 2"
78 $SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TEMPDIR/read.stat
79 if [ $? -ne 0 ] ; then no_result ; fi
82 activity="compare output"
83 diff -B -b $TEMPDIR/pspp.list - << EOF
85 File: $TEMPDIR/foo.save
87 Created: 18 Dec 03 09:05:20 by GNU pspp 0.3.1 - i686-pc-cygwin
94 +--------+-------------+---+
95 |Variable|Description |Pos|
98 #========#=============#===#
100 +--------+-------------+---+
102 if [ $? -ne 0 ] ; then fail ; fi