equal
  deleted
  inserted
  replaced
  
    
    
    11   | 
    11   | 
    12   | 
    12   | 
    13 # compilation tests  | 
    13 # compilation tests  | 
    14   | 
    14   | 
    15 function scala_compile { | 
    15 function scala_compile { | 
    16   (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -Xprint:parser "$1" 2> c$out 1> c$out)  | 
    16   (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala-cli compile "$1" 2> c$out 1> c$out)  | 
    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 -nc -i "$1" -- "$2" -e "" 2> /dev/null 1> /dev/null)  | 
    22   (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala-cli -i "$1" "$2" -e "urbanmain()" 2> /dev/null 1> /dev/null)  | 
    23 }  | 
    23 }  | 
    24   | 
    24   | 
    25 # purity test  | 
    25 # purity test  | 
    26   | 
         | 
    27 function scala_vars { | 
    26 function scala_vars { | 
    28     (sed 's/immutable/ok/g' c$out > cb$out;  | 
    27    (sed 's/immutable/ok/g' c$out > cb$out;  | 
    29      egrep '\bvar\b|\breturn\b|\.par\.|\.par |ListBuffer|AtomicInteger|mutable|util.control|new Array' cb$out 2> /dev/null 1> /dev/null)  | 
    28     egrep '\bvar\b|\breturn\b|\.par\.|\.par |ListBuffer|AtomicInteger|mutable|util.control|new Array' cb$out 2> /dev/null 1> /dev/null)  | 
    30 }  | 
    29 }  | 
    31   | 
         | 
    32   | 
    30   | 
    33   | 
    31   | 
    34 # compilation test  | 
    32 # compilation test  | 
    35   | 
    33   | 
    36 echo -e "re.scala runs?" >> $out  | 
    34 echo -e "re.scala runs?" >> $out  | 
    39 then  | 
    37 then  | 
    40     echo -e "  --> passed" >> $out  | 
    38     echo -e "  --> passed" >> $out  | 
    41     tsts=$(( 0 ))  | 
    39     tsts=$(( 0 ))  | 
    42 else  | 
    40 else  | 
    43     echo -e "  --> SCALA DID NOT RUN RE.SCALA\n" >> $out  | 
    41     echo -e "  --> SCALA DID NOT RUN RE.SCALA\n" >> $out  | 
    44     echo -e "      !!!! Have you checked that you are using Scala 2.13.XX (preferably with XX == 10)?                          !!!\n" >> $out  | 
         | 
    45     echo -e "      !!!! All help-requests and emails where the problems are due to the use of Scala 3 will be quietly ingnored !!!\n" >> $out  | 
         | 
    46     tsts=$(( 1 ))   | 
    42     tsts=$(( 1 ))   | 
    47 fi  | 
    43 fi  | 
    48   | 
    44   | 
    49 # var, return, ListBuffer test  | 
    45 # var, return, ListBuffer test  | 
    50 #  | 
    46 #  |