X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fbugs%2Foverwrite-input-file.sh;h=27795114aaabda7e048e4a6c00644991d30a65c4;hb=f51ecb48027e6b1eb46840ae25888a25b429f012;hp=d9f3e59cb5ce81d0ad33c56ba807be4e3117b5b5;hpb=af4066391f20365e210460a736b1b02efe194da6;p=pspp-builds.git diff --git a/tests/bugs/overwrite-input-file.sh b/tests/bugs/overwrite-input-file.sh index d9f3e59c..27795114 100755 --- a/tests/bugs/overwrite-input-file.sh +++ b/tests/bugs/overwrite-input-file.sh @@ -77,7 +77,7 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program 1" -$SUPERVISOR $PSPP --testing-mode $TESTFILE +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="check and save copy of output files" @@ -103,7 +103,7 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program 2" -{ $SUPERVISOR $PSPP --testing-mode $TESTFILE -e /dev/null; } >/dev/null 2>&1 +{ $SUPERVISOR $PSPP -o pspp.csv $TESTFILE -e /dev/null; } >/dev/null 2>&1 # PSPP should have terminated with a signal. POSIX requires that the exit # status of a process terminated by a signal be greater than 128. if [ $? -le 128 ] ; then no_result ; fi @@ -142,7 +142,7 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program 3" -$SUPERVISOR $PSPP --testing-mode $TESTFILE -e /dev/null +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE -e /dev/null if [ $? -ne 0 ] ; then no_result ; fi activity="check for remaining temporary files" @@ -162,33 +162,34 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program 4" -$SUPERVISOR $PSPP --testing-mode $TESTFILE -e /dev/null +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE -e /dev/null if [ $? -ne 0 ] ; then no_result ; fi activity="compare output" -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b pspp.list - << EOF - X Y --------- -------- - 1.00 2.00 - 2.00 3.00 - 3.00 4.00 - 4.00 5.00 - 5.00 6.00 -X Y -- -------- -1 3.00 -2 4.00 -3 5.00 -4 6.00 -5 7.00 -X Y -- -------- -1 4.00 -2 5.00 -3 6.00 -4 7.00 -5 8.00 +diff -c pspp.csv - << EOF +Table: Data List +X,Y +1.00,2.00 +2.00,3.00 +3.00,4.00 +4.00,5.00 +5.00,6.00 + +Table: Data List +X,Y +1,3.00 +2,4.00 +3,5.00 +4,6.00 +5,7.00 + +Table: Data List +X,Y +1,4.00 +2,5.00 +3,6.00 +4,7.00 +5,8.00 EOF if [ $? -ne 0 ] ; then fail ; fi