3 # This program tests that system files can be read properly, even when the
4 # case_size header value is -1 (Some 3rd party products do this)
7 TEMPDIR=/tmp/pspp-tst-$$
8 TESTFILE=$TEMPDIR/`basename $0`.sps
12 # ensure that top_srcdir is absolute
13 cd $top_srcdir; top_srcdir=`pwd`
15 STAT_CONFIG_PATH=$top_srcdir/config
16 export STAT_CONFIG_PATH
21 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
22 echo "NOT cleaning $TEMPDIR"
57 activity="create program"
59 GET FILE='$top_srcdir/tests/no_case_size.sav'.
63 if [ $? -ne 0 ] ; then no_result ; fi
66 activity="run program"
67 $SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TESTFILE
68 if [ $? -ne 0 ] ; then no_result ; fi
70 activity="compare output"
71 perl -pi -e 's/^\s*$//g' pspp.list
72 diff -b -w pspp.list - <<EOF |perl -e 's/^\s*$//g'
74 +--------+-------------------------------------------+--------+
75 |Variable|Description |Position|
76 #========#===========================================#========#
77 |CONT |continents of the world | 1|
79 +--------+-------------------------------------------+--------+
82 +--------+-------------------------------------------+--------+
85 +--------+-------------------------------------------+--------+
86 |COUNT |number of countries | 4|
88 +--------+-------------------------------------------+--------+
91 -------------------------------- -------- -------- --------
92 Asia 44579000 3.67E+09 44.00
93 Africa 30065000 7.78E+08 53.00
94 North America 24256000 4.83E+08 23.00
95 South America 17819000 3.42E+08 12.00
96 Antarctica 13209000 .00 .00
97 Europe 9938000 7.32E+08 46.00
98 Australia/Oceania 7687000 31000000 14.00
101 if [ $? -ne 0 ] ; then fail ; fi