From: Ben Pfaff Date: Wed, 13 Oct 2010 04:54:53 +0000 (-0700) Subject: data-out: Convert test for WKDAY format to Autotest framework. X-Git-Tag: v0.7.6~22 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa8a924e39c536da8e6dc0114e8332531c63d675;p=pspp-builds.git data-out: Convert test for WKDAY format to Autotest framework. --- diff --git a/tests/automake.mk b/tests/automake.mk index 14d8569f..588f97fa 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -18,7 +18,6 @@ dist_TESTS = \ tests/formats/num-out.sh \ tests/formats/time-in.sh \ tests/formats/wkday-in.sh \ - tests/formats/wkday-out.sh \ tests/formats/360.sh TESTS = $(dist_TESTS) $(nodist_TESTS) diff --git a/tests/data/data-out.at b/tests/data/data-out.at index 217d4bcc..eb40bc46 100644 --- a/tests/data/data-out.at +++ b/tests/data/data-out.at @@ -14674,3 +14674,746 @@ AT_CHECK([cat month-out.out], [0], [dnl . ]) AT_CLEANUP + +AT_SETUP([WKDAY output]) +AT_DATA([wkday-out.sps], [dnl +set mxwarns=10000000. +set mxerrs=10000000. +data list notable/x 1-10. +begin data. + +0 +0.5 +0.9 +1 +2 +3 +4 +4.1 +4.5 +4.9 +5 +6 +7 +7.1 +7.5 +7.9 +8 +end data. +do repeat format=wkday2 to wkday40. +print outfile='wkday-out.out'/x(format). +end repeat. +execute. +]) +AT_CHECK([pspp -O format=csv wkday-out.sps], [1], [stdout]) +AT_CHECK([sed '/^$/d' stdout | sort | uniq -c], [0], [dnl + 39 error: Weekday number 0.000000 is not between 1 and 7. + 39 error: Weekday number 0.500000 is not between 1 and 7. + 39 error: Weekday number 0.900000 is not between 1 and 7. + 39 error: Weekday number 8.000000 is not between 1 and 7. +]) +AT_CHECK([cat wkday-out.out], [0], [dnl + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + SU + SUN + SUND + SUNDA + SUNDAY + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + SUNDAY @&t@ + MO + MON + MOND + MONDA + MONDAY + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + MONDAY @&t@ + TU + TUE + TUES + TUESD + TUESDA + TUESDAY + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + TUESDAY @&t@ + WE + WED + WEDN + WEDNE + WEDNES + WEDNESD + WEDNESDA + WEDNESDAY + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WE + WED + WEDN + WEDNE + WEDNES + WEDNESD + WEDNESDA + WEDNESDAY + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WE + WED + WEDN + WEDNE + WEDNES + WEDNESD + WEDNESDA + WEDNESDAY + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WE + WED + WEDN + WEDNE + WEDNES + WEDNESD + WEDNESDA + WEDNESDAY + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + WEDNESDAY @&t@ + TH + THU + THUR + THURS + THURSD + THURSDA + THURSDAY + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + THURSDAY @&t@ + FR + FRI + FRID + FRIDA + FRIDAY + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + FRIDAY @&t@ + SA + SAT + SATU + SATUR + SATURD + SATURDA + SATURDAY + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SA + SAT + SATU + SATUR + SATURD + SATURDA + SATURDAY + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SA + SAT + SATU + SATUR + SATURD + SATURDA + SATURDAY + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SA + SAT + SATU + SATUR + SATURD + SATURDA + SATURDAY + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + SATURDAY @&t@ + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . +]) +AT_CLEANUP diff --git a/tests/formats/wkday-out.sh b/tests/formats/wkday-out.sh deleted file mode 100755 index ad0c8cd3..00000000 --- a/tests/formats/wkday-out.sh +++ /dev/null @@ -1,785 +0,0 @@ -#! /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-out.pspp <