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 export STAT_CONFIG_PATH=$top_srcdir/config
18 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
19 echo "NOT cleaning $TEMPDIR"
53 activity="Create test file"
54 cat > $TESTFILE << EOF
55 DATA LIST LIST /x * name (a10) .
61 SAVE OUTFILE='pro.sav'.
63 sysfile info file='pro.sav'.
65 if [ $? -ne 0 ] ; then no_result ; fi
68 activity="run program"
69 $SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TESTFILE
70 if [ $? -ne 0 ] ; then no_result ; fi
72 activity="filter output"
73 egrep -v '^(Created|Endian): ' $TEMPDIR/pspp.list > $TEMPDIR/out-filtered
74 if [ $? -ne 0 ] ; then no_result ; fi
76 activity="compare output"
77 diff -b -B -w $TEMPDIR/out-filtered - << EOF
78 1.1 DATA LIST. Reading free-form data from the command file.
93 Mode: Compression off.
95 +--------+-------------+---+
96 |Variable|Description |Pos|
99 #========#=============#===#
100 |x |Format: F8.2 | 1|
101 +--------+-------------+---+
102 |name |Format: A10 | 2|
103 +--------+-------------+---+
106 if [ $? -ne 0 ] ; then fail ; fi