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 > wkday-in.pspp <<EOF
45 data list /wkday2 1-2 (wkday)
66 print outfile='wkday-in.out'/all.
69 if [ $? -ne 0 ] ; then no_result ; fi
71 activity="run program"
72 $SUPERVISOR $PSPP --testing-mode wkday-in.pspp
73 if [ $? -ne 0 ] ; then no_result ; fi
75 activity="compare output"
76 diff -u wkday-in.out - <<EOF
79 MO MO MO MO MO MO MO MO MO
80 TU TU TU TU TU TU TU TU TU
81 WE WE WE WE WE WE WE WE WE
82 TH TH TH TH TH TH TH TH TH
83 FR FR FR FR FR FR FR FR FR
84 SA SA SA SA SA SA SA SA SA
85 SU SU SU SU SU SU SU SU SU
87 if [ $? -ne 0 ] ; then fail ; fi