--- a/marking/mark02b Tue Dec 13 13:02:52 2016 +0000
+++ b/marking/mark02b Fri Dec 16 13:25:08 2016 +0000
@@ -12,7 +12,7 @@
echo "" >> $out
function scala_vars {
- (egrep 'var|return|ListBuffer|mutable' "$1" 2> /dev/null 1> /dev/null)
+ (egrep '\bvar\b|\breturn\b|ListBuffer|mutable' "$1" 2> /dev/null 1> /dev/null)
}
@@ -65,6 +65,20 @@
tsts1=$(( 1 ))
fi
+if [ $tsts1 -eq 0 ]
+then
+ echo " ordered_moves(8, List((3,4), (3,2)), (1, 3)) == List((0,1), (0,5), (2,1), (2,5))" | tee -a $out
+ echo " ordered_moves(8, List((4,0)), (0,0)) == List((2,1), (1,2))" | tee -a $out
+ echo " ordered_moves(8, List((0,4)), (0,0)) == List((1,2), (2,1))" | tee -a $out
+
+ if (scala_assert "knight3.scala.bak" "../../../marking/knight3a_test.scala")
+ then
+ echo " --> success" | tee -a $out
+ marks=$(( marks + 1 ))
+ else
+ echo " --> test failed" | tee -a $out
+ fi
+fi