--- a/testing1/collatz_test.sh Fri Nov 01 12:39:25 2019 +0000
+++ b/testing1/collatz_test.sh Fri Nov 01 23:14:35 2019 +0000
@@ -6,10 +6,10 @@
out=${1:-output}
-echo "" > $out
+echo -e "" > $out
-echo "Below is the feedback for your submission collatz.scala" >> $out
-echo "" >> $out
+echo -e "Below is the feedback for your submission collatz.scala" >> $out
+echo -e "" >> $out
# compilation tests
@@ -33,14 +33,14 @@
# var, .par return, ListBuffer test
#
-echo "collatz.scala does not contain vars, returns etc?" >> $out
+echo -e "collatz.scala does not contain vars, returns etc?" >> $out
if (scala_vars collatz.scala)
then
- echo " --> FAIL (make triple-sure your program conforms to the required format)\n" >> $out
+ echo -e " --> FAIL (make triple-sure your program conforms to the required format)\n" >> $out
tsts0=$(( 0 ))
else
- echo " --> success" >> $out
+ echo -e " --> success" >> $out
tsts0=$(( 0 ))
fi
@@ -49,14 +49,14 @@
if [ $tsts0 -eq 0 ]
then
- echo "collatz.scala runs?" >> $out
+ echo -e "collatz.scala runs?" >> $out
if (scala_compile collatz.scala)
then
- echo " --> success" >> $out
+ echo -e " --> success" >> $out
tsts=$(( 0 ))
else
- echo " --> SCALA DID NOT RUN COLLATZ.SCALA\n" >> $out
+ echo -e " --> SCALA DID NOT RUN COLLATZ.SCALA\n" >> $out
tsts=$(( 1 ))
fi
else
@@ -67,16 +67,16 @@
if [ $tsts -eq 0 ]
then
- echo "collatz.scala tests:" >> $out
- echo " collatz(1) == 0" >> $out
- echo " collatz(6) == 8" >> $out
- echo " collatz(9) == 19" >> $out
+ echo -e "collatz.scala tests:" >> $out
+ echo -e " collatz(1) == 0" >> $out
+ echo -e " collatz(6) == 8" >> $out
+ echo -e " collatz(9) == 19" >> $out
if (scala_assert "collatz.scala" "collatz_test1.scala")
then
- echo " --> success" >> $out
+ echo -e " --> success" >> $out
else
- echo " --> ONE OF THE TESTS FAILED\n" >> $out
+ echo -e " --> ONE OF THE TESTS FAILED\n" >> $out
fi
fi
@@ -84,18 +84,18 @@
if [ $tsts -eq 0 ]
then
- echo " collatz_max(10) == (19, 9)" >> $out
- echo " collatz_max(100) == (118, 97)" >> $out
- echo " collatz_max(1000) == (178, 871)" >> $out
- echo " collatz_max(10000) == (261, 6171)" >> $out
- echo " collatz_max(100000) == (350, 77031)" >> $out
- echo " collatz_max(1000000) == (524, 837799)" >> $out
+ echo -e " collatz_max(10) == (19, 9)" >> $out
+ echo -e " collatz_max(100) == (118, 97)" >> $out
+ echo -e " collatz_max(1000) == (178, 871)" >> $out
+ echo -e " collatz_max(10000) == (261, 6171)" >> $out
+ echo -e " collatz_max(100000) == (350, 77031)" >> $out
+ echo -e " collatz_max(1000000) == (524, 837799)" >> $out
if (scala_assert "collatz.scala" "collatz_test2.scala")
then
- echo " --> success" >> $out
+ echo -e " --> success" >> $out
else
- echo " --> ONE OF THE TESTS FAILED\n" >> $out
+ echo -e " --> ONE OF THE TESTS FAILED\n" >> $out
fi
fi