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
10 # ensure that top_builddir are absolute
11 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
12 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
13 top_builddir=`cd $top_builddir; pwd`
14 PSPP=$top_builddir/src/ui/terminal/pspp
16 # ensure that top_srcdir is absolute
17 top_srcdir=`cd $top_srcdir; pwd`
19 STAT_CONFIG_PATH=$top_srcdir/config
20 export STAT_CONFIG_PATH
25 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
26 echo "NOT cleaning $TEMPDIR"
61 activity="create program"
63 GET FILE='$top_srcdir/tests/no_case_size.sav'.
67 if [ $? -ne 0 ] ; then no_result ; fi
70 activity="run program"
71 $SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
72 if [ $? -ne 0 ] ; then no_result ; fi
74 activity="compare output"
75 perl -pi -e 's/^\s*$//g' pspp.list
76 diff -b -w pspp.list - <<EOF
78 +--------+-------------------------------------------+--------+
79 |Variable|Description |Position|
80 #========#===========================================#========#
81 |CONT |continents of the world | 1|
83 +--------+-------------------------------------------+--------+
86 +--------+-------------------------------------------+--------+
89 +--------+-------------------------------------------+--------+
90 |COUNT |number of countries | 4|
92 +--------+-------------------------------------------+--------+
94 -------------------------------- -------- -------- --------
95 Asia 44579000 3.67E+09 44.00
96 Africa 30065000 7.78E+08 53.00
97 North America 24256000 4.83E+08 23.00
98 South America 17819000 3.42E+08 12.00
99 Antarctica 13209000 .00 .00
100 Europe 9938000 7.32E+08 46.00
101 Australia/Oceania 7687000 31000000 14.00
103 if [ $? -ne 0 ] ; then fail ; fi