Fixed intl/ and some tests, so that the project can be built and tested
[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 cleanup()
11 {
12      rm -rf $TEMPDIR
13 }
14
15
16 fail()
17 {
18     echo $activity
19     echo FAILED
20     cleanup;
21     exit 1;
22 }
23
24
25 no_result()
26 {
27     echo $activity
28     echo NO RESULT;
29     cleanup;
30     exit 2;
31 }
32
33 pass()
34 {
35     cleanup;
36     exit 0;
37 }
38
39 mkdir -p $TEMPDIR
40
41 here=`pwd`;
42
43 activity="create data"
44 cat << EOF > $TEMPDIR/ff.stat 
45
46 data list free /v1 v2.
47 begin data.
48 0 1
49 2 3 
50 4 5
51 3 4
52 end data.
53
54 frequencies v1 v2.
55 EOF
56 if [ $? -ne 0 ] ; then no_result ; fi
57
58 cd $top_srcdir ; top_srcdir=`pwd`
59 cd $TEMPDIR
60
61 activity="run data"
62 $here/../src/pspp -B $top_srcdir/config -o html $TEMPDIR/ff.stat
63 if [ $? -ne 0 ] ; then fail ; fi
64
65
66 pass;