3 # This program tests the use of big numbers
5 TEMPDIR=/tmp/pspp-tst-$$
9 # ensure that top_srcdir is absolute
10 cd $top_srcdir; top_srcdir=`pwd`
12 export STAT_CONFIG_PATH=$top_srcdir/config
48 activity="create data file"
49 cat > $TEMPDIR/bignum.data << wizzah
81 1234567890123456789012
82 19999999999999999999999
83 123456789012345678901234
84 1999999999999999999999999
85 12345678901234567890123456
86 199999999999999999999999999
87 1234567890123456789012345678
88 19999999999999999999999999999
89 123456789012345678901234567890
90 1999999999999999999999999999999
91 12345678901234567890123456789012
92 199999999999999999999999999999999
93 1234567890123456789012345678901234
94 19999999999999999999999999999999999
95 123456789012345678901234567890123456
96 1999999999999999999999999999999999999
97 12345678901234567890123456789012345678
98 199999999999999999999999999999999999999
99 1234567890123456789012345678901234567890
100 1999999999999999999999999999999999999999
113 if [ $? -ne 0 ] ; then no_result ; fi
116 activity="create program"
117 cat > $TEMPDIR/prog.stat <<foobar
118 title 'Test use of big numbers'.
120 *** Do the portable output.
122 ----------------------------------------------------------------------
123 Testing use of big numbers.\n
124 The numbers in the data file are designed for IEEE754 double
125 format--if your system uses something different then the test needs to
126 be adjusted for whatever are big numbers to your system.
127 ----------------------------------------------------------------------
129 data list file='$TEMPDIR/bignum.data'/BIGNUM 1-40.
132 *** Do the nonportable output for fun.
136 ----------------------------------------------------------------------
137 This test merely shows whether your system can successfully handle
138 floating-point overflow. If you get a fatal exception at this point,
139 the source needs some editing--glob.c should mask overflow exceptions
140 in init_glob(). Again, the numbers are specific to IEEE754 double
142 ----------------------------------------------------------------------
147 if [ $? -ne 0 ] ; then no_result ; fi
149 activity="run program"
150 $SUPERVISOR $here/../src/pspp -o raw-ascii prog.stat
151 if [ $? -ne 0 ] ; then no_result ; fi
153 # Like the above comments say ...
154 # ... if we get here without crashing, then the test has passed.