*                                                                              *
*  EXEC file to run the deviance tests for the ORCA/C compiler.  Script file   *
*  simply ensures that compiler's error reporting doesn't crash.               *
*                                                                              *
*  The EXEC file accepts one parameter, the name of the file to receive output *
*    from the test                                                             *
*                                                                              *

unset exit
if {#} != 0
   set out ">> {1}  >>& {1}"
end

* Run tests for Chapter 2, Harbison and Steele

for i in 1.0.1  2.0.2  4.0.1  5.0.1  5.0.2  7.1.1  7.1.2  7.2.1
   echo Test d2.{i}.cc
   if {#} != 0
       echo Test d2.{i}.cc  {out}
   end
   run d2.{i}.cc  keep=3/tmp  {out}
end

for i in 3.1  3.2  3.3  4.1  4.3  4.4
   echo Test d2.7.{i}.cc
   if {#} != 0
       echo Test d2.7.{i}.cc  {out}
   end
   run d2.7.{i}.cc  keep=3/tmp  {out}
end


* Run tests for Chapter 3, Harbison and Steele

for i in 3.1  3.2  3.3  3.4  3.5  3.10  4.0  5.1  5.2
   echo Test d3.{i}.1.cc
   if {#} != 0
       echo Test d3.{i}.1.cc  {out}
   end
   run d3.{i}.1.cc  keep=3/tmp  {out}
end

for i in 3.1  5.1
   echo Test d3.5.{i}.cc
   if {#} != 0
       echo Test d3.5.{i}.cc  {out}
   end
   run d3.5.{i}.cc  keep=3/tmp  {out}
end


* Run tests for Chapter 4, Harbison and Steele

for i in 2.1  2.2  2.3  2.5  2.9  3.0  4.1  5.3  6.0
   echo Test d4.{i}.1.cc
   if {#} != 0
       echo Test d4.{i}.1.cc  {out}
   end
   run d4.{i}.1.cc  keep=3/tmp  {out}
end

for i in  6.0.2  6.1.1  6.2.1  6.3.1  6.4.1  6.5.1
   echo Test d4.{i}.cc
   if {#} != 0
       echo Test d4.{i}.cc  {out}
   end
   run d4.{i}.cc  keep=3/tmp  {out}
end

for i in  6  7  8
   echo Test d4.6.{i}.1.cc
   if {#} != 0
       echo Test d4.6.{i}.1.cc  {out}
   end
   run d4.6.{i}.1.cc  keep=3/tmp  {out}
end


* Run tests for Chapter 7, Harbison and Steele

for i in 1.1  5.4  6.1  6.3  6.4  6.6  6.7  6.8
   echo Test d7.{i}.1.cc
   if {#} != 0
       echo Test d7.{i}.1.cc  {out}
   end
   run d7.{i}.1.cc  keep=3/tmp  {out}
end

for i in 2 3 4
   echo Test d7.6.1.{i}.cc
   if {#} != 0
       echo Test d7.6.1.{i}.cc  {out}
   end
   run d7.6.1.{i}.cc  keep=3/tmp  {out}
end

* Run tests for Chapters 8, and 9, Harbison and Steele

for i in 8.7  8.8  9.2
   echo Test d{i}.0.1.cc
   if {#} != 0
       echo Test d{i}.0.1.cc  {out}
   end
   run d{i}.0.1.cc  keep=3/tmp  {out}
end

* Run tests for mini-assembler

for i in 1 2
   echo Test d25.0.{i}.cc
   if {#} != 0
       echo Test d25.0.{i}.cc  {out}
   end
   run d25.0.{i}.cc  keep=3/tmp  {out}
end
