equal
deleted
inserted
replaced
4 |
4 |
5 out=${1:-output} |
5 out=${1:-output} |
6 |
6 |
7 echo -e "" > $out |
7 echo -e "" > $out |
8 |
8 |
9 echo -e "Below is the feedback for your submission of CW 9, Part 1." >> $out |
9 echo -e "Below is the feedback for your submission of CW 9, Core Part." >> $out |
10 echo -e "" >> $out |
10 echo -e "" >> $out |
11 |
11 |
12 |
12 |
13 # compilation tests |
13 # compilation tests |
14 |
14 |
17 } |
17 } |
18 |
18 |
19 # functional tests |
19 # functional tests |
20 |
20 |
21 function scala_assert { |
21 function scala_assert { |
22 (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -i "$1" "$2" -e "" 2> /dev/null 1> /dev/null) |
22 (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -i "$1" -- "$2" 2> /dev/null 1> /dev/null) |
23 } |
23 } |
24 |
24 |
25 # purity test |
25 # purity test |
26 |
26 |
27 function scala_vars { |
27 function scala_vars { |
33 # |
33 # |
34 echo -e "re.scala does not contain vars, returns etc?" >> $out |
34 echo -e "re.scala does not contain vars, returns etc?" >> $out |
35 |
35 |
36 if (scala_vars re.scala) |
36 if (scala_vars re.scala) |
37 then |
37 then |
38 echo -e " --> fail (make triple-sure your program conforms to the required format)" >> $out |
38 echo -e " --> FAIL (make triple-sure your program conforms to the required format)" >> $out |
39 tsts0=$(( 0 )) |
39 tsts0=$(( 0 )) |
40 else |
40 else |
41 echo -e " --> success" >> $out |
41 echo -e " --> success" >> $out |
42 tsts0=$(( 0 )) |
42 tsts0=$(( 0 )) |
43 fi |
43 fi |