X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=bin%2Flib;h=c9a7f27a6e36be9494b8718cef9c1b6a711fcdb8;hb=5fca32af49d84dcadf96317d54708c20a41ba151;hp=6f5c4763a0420d00acf80e7ea2f6da50e45c8a20;hpb=11186a847caaa8904ecd26f65d5fdc5bcdb2096a;p=eval.git diff --git a/bin/lib b/bin/lib index 6f5c476..c9a7f27 100644 --- a/bin/lib +++ b/bin/lib @@ -211,6 +211,7 @@ function test-result # Translate signal numbers to readable strings SG=${M#Caught fatal signal } + SG=${SG#Committed suicide by signal } if [ "$SG" != "$M" ] ; then SG=`perl -MConfig -e '@s=split / /,$Config{sig_name}; print $s[$ARGV[0]]' $SG` [ -z "$SG" ] || M="$M (SIG$SG)" @@ -243,7 +244,7 @@ function test-prolog box-clean echo "Executable file: $TDIR/$PROBLEM" if [ ! -x $TDIR/$PROBLEM ] ; then - test-result 0 "Compile error." + test-result 0 "Compile error" fi cp $TDIR/$PROBLEM $BOXDIR/ BOX_EXTRAS= @@ -293,10 +294,10 @@ function test-epilog echo "Sandbox contents after exit:" ls -Al $BOXDIR case ${OUT_TYPE:-$IO_TYPE} in - file) [ -f $BOXDIR/$PROBLEM.out ] || test-result 0 "No output file." + file) [ -f $BOXDIR/$PROBLEM.out ] || test-result 0 "No output file" cp $BOXDIR/$PROBLEM.out $TDIR/$TEST.out ;; - stdio) [ -f $BOXDIR/.stdout ] || test-result 0 "No output file." + stdio) [ -f $BOXDIR/.stdout ] || test-result 0 "No output file" cp $BOXDIR/.stdout $TDIR/$TEST.out ;; esac @@ -342,7 +343,7 @@ function test-run-interactive function test-run-open-data { - [ -f $SDIR/$TEST.out ] || test-result 0 "No solution." + [ -f $SDIR/$TEST.out ] || test-result 0 "No solution" ln $SDIR/$TEST.out $TDIR/$TEST.out } @@ -358,7 +359,7 @@ function syntax-check if ! eval $SCHECK 2>$TMPDIR/exec.out ; then cat $TMPDIR/exec.out MSG=`tail -1 $TMPDIR/exec.out` - if [ -z "$MSG" ] ; then MSG="Wrong syntax." ; fi + if [ -z "$MSG" ] ; then MSG="Wrong syntax" ; fi test-result 0 "$MSG" fi cat $TMPDIR/exec.out @@ -377,7 +378,7 @@ function output-check if ! eval $OCHECK 2>$TMPDIR/exec.out ; then cat $TMPDIR/exec.out MSG=`tail -1 $TMPDIR/exec.out` - if [ -z "$MSG" ] ; then MSG="Wrong answer." ; fi + if [ -z "$MSG" ] ; then MSG="Wrong answer" ; fi test-result 0 "$MSG" fi cat $TMPDIR/exec.out