--- a/testing5/bf_test.sh Wed Oct 30 11:51:02 2019 +0000
+++ b/testing5/bf_test.sh Wed Oct 30 12:37:18 2019 +0000
@@ -1,11 +1,11 @@
#!/bin/bash
-set -e
+set -euo pipefail
out=${1:-output}
echo -e "" > $out
-echo -e "Below is the feedback for your submission of CW 10, Part 1." >> $out
+echo -e "Below is the feedback for your submission of CW 10." >> $out
echo -e "" >> $out
@@ -18,7 +18,7 @@
# functional tests
function scala_assert {
- (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -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)
}
# purity test
@@ -34,7 +34,7 @@
if (scala_vars bf.scala)
then
- echo -e " --> fail (make triple-sure your program conforms to the required format)" >> $out
+ echo -e " --> FAIL (make triple-sure your program conforms to the required format)" >> $out
tsts0=$(( 0 ))
else
echo -e " --> success" >> $out
@@ -52,7 +52,7 @@
echo -e " --> success" >> $out
tsts1=$(( 0 ))
else
- echo -e " --> --> SCALA DID NOT RUN BF.SCALA\nx" >> $out
+ echo -e " --> SCALA DID NOT RUN BF.SCALA\n" >> $out
tsts1=$(( 1 ))
fi
else