3 TEMPDIR=/tmp/pspp-tst-$$
5 trap 'cd /; rm -rf $TEMPDIR' 0
7 # ensure that top_builddir are absolute
8 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
9 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
10 top_builddir=`cd $top_builddir; pwd`
11 PSPP=$top_builddir/src/ui/terminal/pspp
13 # ensure that top_srcdir is absolute
14 top_srcdir=`cd $top_srcdir; pwd`
16 STAT_CONFIG_PATH=$top_srcdir/config
17 export STAT_CONFIG_PATH
41 activity="write pspp syntax"
42 cat > month-in.pspp <<EOF
45 data list /month3 1-3 (month)
101 formats all (month3).
102 print outfile='month-in.out'/all.
105 if [ $? -ne 0 ] ; then no_result ; fi
107 activity="run program"
108 $SUPERVISOR $PSPP --testing-mode month-in.pspp
109 if [ $? -ne 0 ] ; then no_result ; fi
111 activity="compare output"
112 diff -u month-in.out - <<EOF
115 JAN JAN JAN JAN JAN JAN JAN JAN
116 FEB FEB FEB FEB FEB FEB FEB FEB
117 MAR MAR MAR MAR MAR MAR MAR MAR
119 APR APR APR APR APR APR APR APR
120 MAY MAY MAY MAY MAY MAY MAY MAY
121 JUN JUN JUN JUN JUN JUN JUN JUN
122 JUL JUL JUL JUL JUL JUL JUL JUL
123 JUL AUG AUG AUG AUG AUG AUG AUG
124 SEP SEP SEP SEP SEP SEP SEP SEP
125 JUL AUG AUG AUG AUG AUG AUG AUG
126 OCT OCT OCT OCT OCT OCT OCT OCT
127 NOV NOV NOV NOV NOV NOV NOV NOV
128 DEC DEC DEC DEC DEC DEC DEC DEC
130 JAN JAN JAN JAN JAN JAN JAN JAN
131 FEB FEB FEB FEB FEB FEB FEB FEB
132 MAR MAR MAR MAR MAR MAR MAR MAR
133 APR APR APR APR APR APR APR APR
134 MAY MAY MAY MAY MAY MAY MAY MAY
135 JUN JUN JUN JUN JUN JUN JUN JUN
136 JUL JUL JUL JUL JUL JUL JUL JUL
137 AUG AUG AUG AUG AUG AUG AUG AUG
138 SEP SEP SEP SEP SEP SEP SEP SEP
139 OCT OCT OCT OCT OCT OCT OCT OCT
140 NOV NOV NOV NOV NOV NOV NOV NOV
141 DEC DEC DEC DEC DEC DEC DEC DEC
143 JAN JAN JAN JAN JAN JAN JAN JAN
144 JAN JAN JAN JAN JAN JAN JAN JAN
145 FEB FEB FEB FEB FEB FEB FEB FEB
146 FEB FEB FEB FEB FEB FEB FEB FEB
147 MAR MAR MAR MAR MAR MAR MAR MAR
148 MAR MAR MAR MAR MAR MAR MAR MAR
149 APR APR APR APR APR APR APR APR
150 MAY MAY MAY MAY MAY MAY MAY MAY
151 JUN JUN JUN JUN JUN JUN JUN JUN
152 JUL JUL JUL JUL JUL JUL JUL JUL
153 AUG AUG AUG AUG AUG AUG AUG AUG
154 SEP SEP SEP SEP SEP SEP SEP SEP
155 OCT OCT OCT OCT OCT OCT OCT OCT
156 NOV NOV NOV NOV NOV NOV NOV NOV
157 DEC DEC DEC DEC DEC DEC DEC DEC
158 DEC DEC DEC DEC DEC DEC DEC DEC
160 if [ $? -ne 0 ] ; then fail ; fi