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 grep -v '^Created: ' $TEMPDIR/pspp.list > $TEMPDIR/out-filtered
74 if [ $? -ne 0 ] ; then no_result ; fi
76 activity="compare output"
77 diff $TEMPDIR/out-filtered - << EOF
78 1.1 DATA LIST. Reading free-form data from the command file.
94 Mode: Compression off.
96 +--------+-------------+---+
97 |Variable|Description |Pos|
100 #========#=============#===#
101 |x |Format: F8.2 | 1|
102 +--------+-------------+---+
103 |name |Format: A10 | 2|
104 +--------+-------------+---+
107 if [ $? -ne 0 ] ; then fail ; fi