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 perl -pi -e 's/^\s*$//g' $TEMPDIR/out-filtered
80 diff -b -w $TEMPDIR/out-filtered - << EOF |perl -e 's/^\s*$//g'
81 1.1 DATA LIST. Reading free-form data from the command file.
96 Mode: Compression off.
98 +--------+-------------+---+
99 |Variable|Description |Pos|
102 #========#=============#===#
103 |x |Format: F8.2 | 1|
104 +--------+-------------+---+
105 |name |Format: A10 | 2|
106 +--------+-------------+---+
109 if [ $? -ne 0 ] ; then fail ; fi