marking/mark02
changeset 102 085bf16963c6
parent 96 abfcb6111d33
--- a/marking/mark02	Wed Jan 11 14:46:37 2017 +0000
+++ b/marking/mark02	Wed Jan 11 14:56:16 2017 +0000
@@ -12,7 +12,7 @@
 echo "" >> $out
 
 function scala_vars {
-   (egrep '\bvar\b|\breturn\b|ListBuffer|mutable' "$1" 2> /dev/null 1> /dev/null)
+   (egrep 'var|return|ListBuffer|mutable' "$1" 2> /dev/null 1> /dev/null)
 }
 
 
@@ -189,6 +189,38 @@
 fi
 
 
+# knights3: var, comments test
+#
+#echo "knight3.scala does not contain vars, returns etc?" | tee -a $out
+
+#if (scala_vars knight3.scala)
+#then
+#  echo "  --> fail" | tee -a $out
+#  tsts0=$(( 1 ))
+#else
+#  echo "  --> success" | tee -a $out
+#  tsts0=$(( 0 )) 
+#fi
+
+
+# compilation test
+#if  [ $tsts0 -eq 0 ]
+#then    
+#  echo "knight3.scala runs?" | tee -a $out
+#
+#  if (scala_compile knight3.scala.bak)
+#  then
+#    echo "  --> success" | tee -a $out
+#    tsts1=$(( 0 ))
+#  else
+#    echo "  --> scala did not run knight3.scala" | tee -a $out
+#    tsts1=$(( 1 )) 
+#  fi
+#else
+#  tsts1=$(( 1 ))     
+#fi
+
+
 ## final marks
-echo "Overall mark for CW 7, Part 1 " | tee -a $out
+echo "Overall mark for CW 2, Part 1 " | tee -a $out
 echo "$marks" | tee -a $out