X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Finsert.sh;h=c6d1464cdc1c738cfdd9509740cbfd61b0288347;hb=ef1c533e8f71be42b019cdbf4c5791b6bcd2d476;hp=ba4f543a790e6e595455271974aa3ed5b237b8fc;hpb=68f08c4bb53fcde16035b622bdb6e9529f9cf3ae;p=pspp-builds.git diff --git a/tests/command/insert.sh b/tests/command/insert.sh index ba4f543a..c6d1464c 100755 --- a/tests/command/insert.sh +++ b/tests/command/insert.sh @@ -2,7 +2,8 @@ # This program tests the INSERT command -TEMPDIR=/tmp/pspp-tst-$$ +BASETEMPDIR=/tmp/pspp-tst-$$ +TEMPDIR=$BASETEMPDIR/link TESTFILE=$TEMPDIR/`basename $0`.sps # ensure that top_srcdir and top_builddir are absolute @@ -23,10 +24,11 @@ export LANG cleanup() { if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then - echo "NOT cleaning $TEMPDIR" + echo "NOT cleaning $BASETEMPDIR" return ; fi - rm -rf $TEMPDIR + cd / + rm -rf $BASETEMPDIR } @@ -53,7 +55,9 @@ pass() exit 0; } -mkdir -p $TEMPDIR +mkdir -p $BASETEMPDIR/target + +ln -s $BASETEMPDIR/target $TEMPDIR cd $TEMPDIR @@ -210,11 +214,12 @@ $SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE > /dev/null if [ $? -ne 1 ] ; then no_result ; fi activity="examine output 1" -diff $TEMPDIR/pspp.list - < /dev/null if [ $? -ne 1 ] ; then no_result ; fi activity="examine output 2" -diff $TEMPDIR/pspp.list - < $TESTFILE +INSERT + FILE='$TEMPDIR/nonexistent' + ERROR=CONTINUE. + . + +LIST. + +EOF +if [ $? -ne 0 ] ; then no_result ; fi +#This command should fail +activity="run program 7" +$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE > /dev/null +if [ $? -eq 0 ] ; then no_result ; fi pass;