COMMENT: Convert test to Autotest framework.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 10 Oct 2010 19:56:24 +0000 (12:56 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 10 Oct 2010 19:56:24 +0000 (12:56 -0700)
tests/automake.mk
tests/bugs/comment-at-eof.sh [deleted file]
tests/language/command.at

index 6a77585ab42ea8184022fe58af94c180b71a16d3..fc246a2f245603e3336b0d036a244d43a0deda68 100644 (file)
@@ -27,7 +27,6 @@ dist_TESTS = \
        tests/formats/wkday-in.sh \
        tests/formats/wkday-out.sh \
        tests/formats/360.sh \
-       tests/bugs/comment-at-eof.sh \
        tests/bugs/curtailed.sh \
        tests/bugs/if_crash.sh \
        tests/bugs/input-crash.sh \
diff --git a/tests/bugs/comment-at-eof.sh b/tests/bugs/comment-at-eof.sh
deleted file mode 100755 (executable)
index 23cbcba..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-# Tests for a bug wherein a comment just before end-of-file caused an
-# infinite loop.  Thus, this test passes as long as it completes.
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# 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
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TESTFILE <<EOF
-COMMENT this is a comment at end of file.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
-if [ $? -ne 0 ] ; then fail; fi
-
-pass;
index 029e1b1fb9dab3f97899aca61f8730aac28e3073..1bd6ccf2ebc1fc22d4de85bc1c1bb4621945d456 100644 (file)
@@ -77,3 +77,14 @@ x
 15.00
 ])
 AT_CLEANUP
+
+AT_BANNER([COMMENT])
+
+dnl Tests for a bug wherein a comment just before end-of-file caused an
+dnl infinite loop.
+AT_SETUP([COMMENT at end of file])
+AT_DATA([comment.sps], [dnl
+COMMENT this is a comment at end of file.
+])
+AT_CHECK([pspp -O format=csv comment.sps])
+AT_CLEANUP