X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=tests%2Fcommand%2Fmissing-values.sh;h=7d567ac59bb301fcdb7a5cf1802f0213f0be7fe5;hb=805e7e4f88947b7c39ca2890927a50ef5391d956;hp=8e45231234eaa86bdea1a81a41ceca5af77732d5;hpb=65a4e29574b67921ea899b6a1d45806dca11db00;p=pspp diff --git a/tests/command/missing-values.sh b/tests/command/missing-values.sh index 8e45231234..7d567ac59b 100755 --- a/tests/command/missing-values.sh +++ b/tests/command/missing-values.sh @@ -9,7 +9,7 @@ TESTFILE=$TEMPDIR/`basename $0`.sps 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 +PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT # ensure that top_srcdir is absolute top_srcdir=`cd $top_srcdir; pwd` @@ -17,9 +17,15 @@ top_srcdir=`cd $top_srcdir; pwd` STAT_CONFIG_PATH=$top_srcdir/config export STAT_CONFIG_PATH +LANG=C +export LANG cleanup() { + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo "NOT cleaning $TEMPDIR" + return ; + fi cd / rm -rf $TEMPDIR } @@ -60,7 +66,8 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="create program" cat > $TEMPDIR/missing-values.stat << foobar -DATA LIST NOTABLE/str1 1-5 (A) str2 6-8 (A) date1 9-19 (DATE) num1 20-25. +DATA LIST NOTABLE/str1 1-5 (A) str2 6-8 (A) date1 9-19 (DATE) num1 20-25 + longstr 26-36 (A). /* Valid: numeric missing values. MISSING VALUES date1 num1 (1). @@ -90,10 +97,13 @@ MISSING VALUES num1 (1 THRU HI, -1). MISSING VALUES num1 (1 THRU HIGHEST, -1). /* Valid: string missing values. -MISSING VALUES str1 str2 ('abc ','def'). +MISSING VALUES str1 str2 longstr ('abc ','def'). /* Invalid: too long for str2. -MISSING VALUES str1 str2 ('abcde'). +MISSING VALUES str1 str2 longstr ('abcde'). + +/* Invalid: long string missing value longer than 8 bytes. +MISSING VALUES longstr ('abcdefghijk'). /* Invalid: no string ranges. MISSING VALUES str1 ('a' THRU 'z'). @@ -109,19 +119,17 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $PSPP --testing-mode -o raw-ascii --testing-mode $TEMPDIR/missing-values.stat > $TEMPDIR/errs +$SUPERVISOR $PSPP -o pspp.csv --error-file=$TEMPDIR/errs $TEMPDIR/missing-values.stat # Note vv --- there are errors in input. Therefore, the command must FAIL if [ $? -eq 0 ] ; then fail ; fi activity="compare error messages" -diff -w $TEMPDIR/errs - <