marking5/bfc_test.sh
changeset 286 5c57c407e27b
parent 255 44f2b6e34015
--- a/marking5/bfc_test.sh	Wed Oct 30 11:51:02 2019 +0000
+++ b/marking5/bfc_test.sh	Wed Oct 30 12:37:18 2019 +0000
@@ -10,7 +10,7 @@
 
 
 echo "Below is the feedback and provisional marks for your submission" >> $out
-echo "for assignment 10 Advanced Part 2.  Please note all marks are provisional until" >> $out
+echo "for assignment 10 Part 2.  Please note all marks are provisional until" >> $out
 echo "ratified by the assessment board -- this is not an official" >> $out
 echo "results transcript." >> $out
 echo "" >> $out
@@ -21,13 +21,13 @@
 # compilation tests
 
 function scala_compile {
-    (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -nc "$1" 2> /dev/null 1> /dev/null)
+    (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala "$1" 2> /dev/null 1> /dev/null)
 }
 
 # functional tests
 
 function scala_assert {
-    (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" "$2" -e "" 2> /dev/null 1> /dev/null)
+    (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -i "$1" -- "$2" 2> /dev/null 1> /dev/null)
 }
 
 
@@ -45,7 +45,7 @@
 
 if (scala_vars bfc.scala)
 then
-  echo "  --> test failed" | tee -a $out
+  echo "  --> FAIL (make triple-sure your program conforms to the required format)" | tee -a $out
   tsts0=$(( 1 ))
 else
   echo "  --> success" | tee -a $out
@@ -63,7 +63,7 @@
     echo "  --> success" | tee -a $out
     tsts1=$(( 0 ))
   else
-    echo "  --> scala bfc.scala did not run successfully" | tee -a $out
+    echo "  --> SCALA DID NOT RUN BFC.SCALA\n" | tee -a $out
     tsts1=$(( 1 )) 
   fi
 else
@@ -94,7 +94,7 @@
       echo "  --> success" | tee -a $out
       marks=$(( marks + 1 ))
   else
-    echo "  --> test failed" | tee -a $out
+    echo "  --> \n ONE TEST FAILED\n" | tee -a $out
   fi
 fi
 
@@ -120,7 +120,7 @@
       echo "  --> success" | tee -a $out
       marks=$(( marks + 1 ))
   else
-    echo "  --> test failed" | tee -a $out
+      echo "  --> \n ONE TEST FAILED\n" | tee -a $out
   fi
 fi
 
@@ -145,12 +145,12 @@
       echo "  --> success" | tee -a $out
       marks=$(( marks + 2 ))
   else
-      echo "  --> test failed" | tee -a $out
+      echo "  --> \n ONE TEST FAILED\n" | tee -a $out
   fi
 fi
 
 
 ## final marks
-echo "Overall mark for CW 10, Advanced Part 2" | tee -a $out
+echo "Overall mark for CW 10, Part 2" | tee -a $out
 echo "$marks" | tee -a $out