core_marking2/docdiff_test.sh
author Christian Urban <christian.urban@kcl.ac.uk>
Sun, 15 Jan 2023 10:58:13 +0000
changeset 462 34feeb53c0ba
parent 424 daf561a83ba6
child 463 0315d9983cd0
permissions -rwxr-xr-x
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
     1
#!/bin/zsh
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
# to make the script fail safely
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
set -euo pipefail
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
out=${1:-output}
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
echo "" > $out
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    11
echo `date` >> $out
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
    12
echo -e "Below is the feedback and provisional marks for your submission" >> $out
424
Christian Urban <christian.urban@kcl.ac.uk>
parents: 382
diff changeset
    13
echo -e "for the Core Part 2 (Scala).  Please note all marks are provisional until" >> $out
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
    14
echo -e "ratified by the assessment board -- this is not an official" >> $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
    15
echo -e "results transcript." >> $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
    16
echo -e "" >> $out
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
    18
echo -e "Below is the feedback for your submission docdiff.scala" >> $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
    19
echo -e "" >> $out
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
424
Christian Urban <christian.urban@kcl.ac.uk>
parents: 382
diff changeset
    21
# marks for C2 core part
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    22
marks=$(( 0.0 ))
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
# compilation tests
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
function scala_compile {
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    28
  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -Xprint:parser "$1" 2> c$out 1> c$out)
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
}
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
# functional tests
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
function scala_assert {
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    34
  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" -- "$2" -e "" 2> /dev/null 1> /dev/null)
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
}
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
# purity test
424
Christian Urban <christian.urban@kcl.ac.uk>
parents: 382
diff changeset
    38
function scala_vars {
Christian Urban <christian.urban@kcl.ac.uk>
parents: 382
diff changeset
    39
   (sed 's/immutable/ok/g' c$out > cb$out;
Christian Urban <christian.urban@kcl.ac.uk>
parents: 382
diff changeset
    40
    egrep '\bvar\b|\breturn\b|\.par\.|\.par |ListBuffer|AtomicInteger|mutable|util.control|new Array' cb$out 2> /dev/null 1> /dev/null)
Christian Urban <christian.urban@kcl.ac.uk>
parents: 382
diff changeset
    41
}
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    45
### compilation test
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    46
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    47
echo -e "docdiff.scala runs?" |  tee -a $out
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    48
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    49
if (scala_compile docdiff.scala)
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    50
then
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    51
    echo -e "  --> success" |  tee -a $out
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    52
    tsts=$(( 0 ))
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    53
else
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    54
    echo -e "  --> SCALA DID NOT RUN docdiff.scala\n" |  tee -a $out
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    55
    tsts=$(( 1 )) 
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    56
fi
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    57
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    58
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
# var, .par return, ListBuffer test
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
#
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    62
if  [ $tsts -eq 0 ]
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    63
then     
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    64
   echo -e "docdiff.scala does not contain VARS, RETURNS etc?" |  tee -a $out
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    66
   if (scala_vars docdiff.scala)
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    67
   then
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    68
      echo -e "  --> test failed\n" | tee -a $out  
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    69
      tsts=$(( 1 ))
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    70
   else
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    71
      echo -e "  --> success" |  tee -a $out
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    72
      tsts=$(( 0 )) 
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    73
   fi
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    74
else
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    75
   tsts=$(( 1 ))  
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    76
fi 
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    78
echo >> $out
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    79
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
### docdiff clean tests
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
if [ $tsts -eq 0 ]
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
then
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
    85
  echo -e "docdiff.scala tests:" |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
    86
  echo -e "  clean(\"ab a abc\") == List(\"ab\", \"a\", \"abc\")" |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
    87
  echo -e "  clean(\"ab*a abc1\") == List(\"ab\", \"a\", \"abc1\")" |  tee -a $out
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
  if (scala_assert "docdiff.scala" "docdiff_test1.scala")
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
  then
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
    91
      echo -e "  --> success" |  tee -a $out
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
    92
      marks=$(( marks + 0.5 ))
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  else
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
    94
      echo -e "  --> ONE OF THE TESTS FAILED\n" |  tee -a $out
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
  fi
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
fi
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
### docdiff occurrences tests
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
if [ $tsts -eq 0 ]
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
then
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   102
  echo -e "  occurrences(List(\"a\", \"b\", \"b\", \"c\", \"d\")) == " |  tee -a $out
424
Christian Urban <christian.urban@kcl.ac.uk>
parents: 382
diff changeset
   103
  echo -e "      Map(\"a\" -> 1, \"b\" -> 2, \"c\" -> 1, \"d\" -> 1)"  |  tee -a $out
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   104
  echo -e "  " |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   105
  echo -e "  occurrences(List(\"d\", \"b\", \"d\", \"b\", \"d\")) == " |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   106
  echo -e "      Map(\"d\" -> 3, \"b\" -> 2)" |  tee -a $out
323
1f8005b4cdf6 updated
Christian Urban <urbanc@in.tum.de>
parents: 283
diff changeset
   107
  echo -e "  " |  tee -a $out
1f8005b4cdf6 updated
Christian Urban <urbanc@in.tum.de>
parents: 283
diff changeset
   108
  echo -e "  occurrences(Nil) == Map() " |  tee -a $out
1f8005b4cdf6 updated
Christian Urban <urbanc@in.tum.de>
parents: 283
diff changeset
   109
  echo -e "  " |  tee -a $out
1f8005b4cdf6 updated
Christian Urban <urbanc@in.tum.de>
parents: 283
diff changeset
   110
  echo -e "  occurrences(List(\"b\", \"b\", \"b\", \"b\", \"b\")) == Map(\"b\" -> 5)" |  tee -a $out
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
  if (scala_assert "docdiff.scala" "docdiff_test2.scala") 
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
  then
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   114
      echo -e "  --> success" |  tee -a $out
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
   115
      marks=$(( marks + 1.0 ))
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
  else
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
   117
      echo -e "  --> ONE OF THE TESTS FAILED\n" |  tee -a $out
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
  fi
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
fi
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
### docdiff prod tests
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
if [ $tsts -eq 0 ]
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
then
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   125
  echo -e "  val l1 = List(\"a\", \"b\", \"b\", \"c\", \"d\")" |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   126
  echo -e "  val l2 = List(\"d\", \"b\", \"d\", \"b\", \"d\")" |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   127
  echo -e "  " |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   128
  echo -e "  prod(l1, l2) == 7 " |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   129
  echo -e "  prod(l1, l1) == 7 " |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   130
  echo -e "  prod(l2, l2) == 13 " |  tee -a $out
323
1f8005b4cdf6 updated
Christian Urban <urbanc@in.tum.de>
parents: 283
diff changeset
   131
  echo -e "  " |  tee -a $out
1f8005b4cdf6 updated
Christian Urban <urbanc@in.tum.de>
parents: 283
diff changeset
   132
  echo -e "  val l3 = List(\"1\", \"2\", \"3\", \"4\", \"5\")" |  tee -a $out
1f8005b4cdf6 updated
Christian Urban <urbanc@in.tum.de>
parents: 283
diff changeset
   133
  echo -e "  prod(l1, l3) == 0 " |  tee -a $out
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   134
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
  if (scala_assert "docdiff.scala" "docdiff_test3.scala") 
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
  then
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   137
      echo -e "  --> success" |  tee -a $out
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
   138
      marks=$(( marks + 1.0 ))
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   139
  else
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
   140
      echo -e "  --> ONE OF THE TESTS FAILED\n" |  tee -a $out
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   141
  fi
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
fi
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
### docdiff overlap tests
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
if [ $tsts -eq 0 ]
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
then
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   148
  echo -e "  val l1 = List(\"a\", \"b\", \"b\", \"c\", \"d\")" |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   149
  echo -e "  val l2 = List(\"d\", \"b\", \"d\", \"b\", \"d\")" |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   150
  echo -e "  " |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   151
  echo -e "  overlap(l1, l2) == 0.5384615384615384 " |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   152
  echo -e "  overlap(l1, l1) == 1.0 " |  tee -a $out
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   153
  echo -e "  overlap(l2, l2) == 1.0 " |  tee -a $out
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   155
  if (scala_assert "docdiff.scala" "docdiff_test4.scala") 
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
  then
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   157
      echo -e "  --> success" |  tee -a $out
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
   158
      marks=$(( marks + 0.5 ))
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   159
  else
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 228
diff changeset
   160
      echo -e "  --> ONE OF THE TESTS FAILED\n" |  tee -a $out
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   161
  fi
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   162
fi
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   163
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   164
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   165
## final marks
424
Christian Urban <christian.urban@kcl.ac.uk>
parents: 382
diff changeset
   166
echo -e "Overall mark for the Core Part 2 (Scala)" | tee -a $out
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
   167
printf " %0.1f\n" $marks | tee -a $out
227
b5f3e814a710 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   168
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
   169
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
   170
#echo -e " $marks" | tee -a $out
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 323
diff changeset
   171