AT_CHECK([pspp -O format=csv legacy-in.sps])
AT_CHECK([cat legacy-in.out], [0], [expout])
AT_CLEANUP
+
+AT_SETUP([WKDAY input format])
+AT_DATA([wkday.sps], [dnl
+DATA LIST NOTABLE /wkday2 1-2 (wkday)
+ wkday3 1-3 (wkday)
+ wkday4 1-4 (wkday)
+ wkday5 1-5 (wkday)
+ wkday6 1-6 (wkday)
+ wkday7 1-7 (wkday)
+ wkday8 1-8 (wkday)
+ wkday9 1-9 (wkday)
+ wkday10 1-10 (wkday).
+BEGIN DATA.
+
+.
+monady
+tuseday
+WEDENSDAY
+Thurdsay
+fRidya
+SAturady
+sudnay
+sturday
+END DATA.
+FORMATS ALL (WKDAY2).
+PRINT OUTFILE='wkday.out'/ALL.
+EXECUTE.
+])
+AT_CHECK([pspp -O format=csv wkday.sps], [0], [dnl
+wkday.sps:20.1-2: warning: Data for variable wkday2 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified.
+
+wkday.sps:20.1-3: warning: Data for variable wkday3 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified.
+
+wkday.sps:20.1-4: warning: Data for variable wkday4 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified.
+
+wkday.sps:20.1-5: warning: Data for variable wkday5 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified.
+
+wkday.sps:20.1-6: warning: Data for variable wkday6 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified.
+
+wkday.sps:20.1-7: warning: Data for variable wkday7 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified.
+
+wkday.sps:20.1-8: warning: Data for variable wkday8 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified.
+
+wkday.sps:20.1-9: warning: Data for variable wkday9 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified.
+
+wkday.sps:20.1-10: warning: Data for variable wkday10 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified.
+])
+AT_CHECK([cat wkday.out], [0], [dnl
+ . . . . . . . . . @&t@
+ . . . . . . . . . @&t@
+ MO MO MO MO MO MO MO MO MO @&t@
+ TU TU TU TU TU TU TU TU TU @&t@
+ WE WE WE WE WE WE WE WE WE @&t@
+ TH TH TH TH TH TH TH TH TH @&t@
+ FR FR FR FR FR FR FR FR FR @&t@
+ SA SA SA SA SA SA SA SA SA @&t@
+ SU SU SU SU SU SU SU SU SU @&t@
+ . . . . . . . . . @&t@
+])
+AT_CLEANUP
+++ /dev/null
-#! /bin/sh
-
-TEMPDIR=/tmp/pspp-tst-$$
-mkdir -p $TEMPDIR
-trap 'cd /; rm -rf $TEMPDIR' 0
-
-# ensure that top_builddir are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-fail()
-{
- echo $activity
- echo FAILED
- exit 1;
-}
-
-
-no_result()
-{
- echo $activity
- echo NO RESULT;
- exit 2;
-}
-
-pass()
-{
- exit 0;
-}
-
-cd $TEMPDIR
-
-activity="write pspp syntax"
-cat > wkday-in.pspp <<EOF
-set errors=none.
-set mxwarns=10000000.
-data list /wkday2 1-2 (wkday)
- wkday3 1-3 (wkday)
- wkday4 1-4 (wkday)
- wkday5 1-5 (wkday)
- wkday6 1-6 (wkday)
- wkday7 1-7 (wkday)
- wkday8 1-8 (wkday)
- wkday9 1-9 (wkday)
- wkday10 1-10 (wkday).
-begin data.
-
-.
-monady
-tuseday
-wedensday
-thurdsay
-fridya
-saturady
-sudnay
-end data.
-formats all (wkday2).
-print outfile='wkday-in.out'/all.
-execute.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="run program"
-$SUPERVISOR $PSPP -o pspp.csv wkday-in.pspp
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="compare output"
-diff -u wkday-in.out - <<EOF
- . . . . . . . . .
- . . . . . . . . .
- MO MO MO MO MO MO MO MO MO
- TU TU TU TU TU TU TU TU TU
- WE WE WE WE WE WE WE WE WE
- TH TH TH TH TH TH TH TH TH
- FR FR FR FR FR FR FR FR FR
- SA SA SA SA SA SA SA SA SA
- SU SU SU SU SU SU SU SU SU
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass