Removed inappropriate assertion from list.q
[pspp-builds.git] / tests / bugs / html-frequency.sh
1 #!/bin/sh
2
3 # This program tests for a bug where pspp would crash 
4 # when a FREQUENCIES command was used with the html 
5 # driver.
6
7
8 TEMPDIR=/tmp/pspp-tst-$$
9
10 here=`pwd`
11
12 # ensure that top_srcdir is absolute
13 cd $top_srcdir ; top_srcdir=`pwd`
14
15 STAT_CONFIG_PATH=$top_srcdir/config
16
17 cleanup()
18 {
19      rm -rf $TEMPDIR
20 }
21
22
23 fail()
24 {
25     echo $activity
26     echo FAILED
27     cleanup;
28     exit 1;
29 }
30
31
32 no_result()
33 {
34     echo $activity
35     echo NO RESULT;
36     cleanup;
37     exit 2;
38 }
39
40 pass()
41 {
42     cleanup;
43     exit 0;
44 }
45
46 mkdir -p $TEMPDIR
47
48
49 activity="create data"
50 cat << EOF > $TEMPDIR/ff.stat 
51
52 data list free /v1 v2.
53 begin data.
54 0 1
55 2 3 
56 4 5
57 3 4
58 end data.
59
60 list.
61
62 frequencies v1 v2.
63 EOF
64 if [ $? -ne 0 ] ; then no_result ; fi
65
66 cd $TEMPDIR
67
68 activity="run data"
69 $here/../src/pspp -o html $TEMPDIR/ff.stat
70 if [ $? -ne 0 ] ; then fail ; fi
71
72
73 pass;