3 # This program tests that SYSFILE INFO works.
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
19 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
20 echo "NOT cleaning $TEMPDIR"
55 activity="Create test file"
56 cat > $TESTFILE << EOF
57 DATA LIST LIST /x * name (a10) .
63 SAVE OUTFILE='pro.sav'.
65 sysfile info file='pro.sav'.
67 if [ $? -ne 0 ] ; then no_result ; fi
70 activity="run program"
71 $SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TESTFILE
72 if [ $? -ne 0 ] ; then no_result ; fi
74 activity="filter output"
75 egrep -v '^(Created|Endian): ' $TEMPDIR/pspp.list > $TEMPDIR/out-filtered
76 if [ $? -ne 0 ] ; then no_result ; fi
78 activity="compare output"
79 diff -b -B -w $TEMPDIR/out-filtered - << EOF
80 1.1 DATA LIST. Reading free-form data from the command file.
95 Mode: Compression off.
97 +--------+-------------+---+
98 |Variable|Description |Pos|
101 #========#=============#===#
102 |x |Format: F8.2 | 1|
103 +--------+-------------+---+
104 |name |Format: A10 | 2|
105 +--------+-------------+---+
108 if [ $? -ne 0 ] ; then fail ; fi