equal
deleted
inserted
replaced
10 echo "ratified by the assessment board -- this is not an official" >> $out |
10 echo "ratified by the assessment board -- this is not an official" >> $out |
11 echo "results transcript." >> $out |
11 echo "results transcript." >> $out |
12 echo "" >> $out |
12 echo "" >> $out |
13 |
13 |
14 function scala_vars { |
14 function scala_vars { |
15 (egrep 'var|return|ListBuffer|mutable' "$1" 2> /dev/null 1> /dev/null) |
15 (egrep '\bvar\b|\breturn\b|ListBuffer|mutable' "$1" 2> /dev/null 1> /dev/null) |
16 } |
16 } |
17 |
17 |
18 |
18 |
19 # compilation tests |
19 # compilation tests |
20 |
20 |
187 echo " --> test failed" | tee -a $out |
187 echo " --> test failed" | tee -a $out |
188 fi |
188 fi |
189 fi |
189 fi |
190 |
190 |
191 |
191 |
192 # knights3: var, comments test |
|
193 # |
|
194 #echo "knight3.scala does not contain vars, returns etc?" | tee -a $out |
|
195 |
|
196 #if (scala_vars knight3.scala) |
|
197 #then |
|
198 # echo " --> fail" | tee -a $out |
|
199 # tsts0=$(( 1 )) |
|
200 #else |
|
201 # echo " --> success" | tee -a $out |
|
202 # tsts0=$(( 0 )) |
|
203 #fi |
|
204 |
|
205 |
|
206 # compilation test |
|
207 #if [ $tsts0 -eq 0 ] |
|
208 #then |
|
209 # echo "knight3.scala runs?" | tee -a $out |
|
210 # |
|
211 # if (scala_compile knight3.scala.bak) |
|
212 # then |
|
213 # echo " --> success" | tee -a $out |
|
214 # tsts1=$(( 0 )) |
|
215 # else |
|
216 # echo " --> scala did not run knight3.scala" | tee -a $out |
|
217 # tsts1=$(( 1 )) |
|
218 # fi |
|
219 #else |
|
220 # tsts1=$(( 1 )) |
|
221 #fi |
|
222 |
|
223 |
|
224 ## final marks |
192 ## final marks |
225 echo "Overall mark for CW 2, Part 1 " | tee -a $out |
193 echo "Overall mark for CW 7, Part 1 " | tee -a $out |
226 echo "$marks" | tee -a $out |
194 echo "$marks" | tee -a $out |