[project @ 1998-12-02 13:17:09 by simonm]
[ghc-hetmet.git] / ghc / interpreter / test / unused / testScript.in
1 #! /bin/sh
2
3 CONTEXT_DIFF='@CONTEXT_DIFF@'
4 export CONTEXT_DIFF
5 DEV_NULL='@DEV_NULL@'
6 export DEV_NULL
7
8 test_static() {
9   echo "\
10 ----------------------------------------------------------------
11 -- Testing syntax checking, static checking and modules.
12 -- This group of checks will produce about 100 lines of output of the form
13 -- 
14 -- --!!! <description of feature being tested>
15 -- 
16 -- You should report a problem if any other output is generated.
17 ----------------------------------------------------------------"
18
19   # Test syntax/static checks on use of qualified names
20   perl runstdtest hugs +q -pHugs: -s13 "-Otest/qual1.hs"  "-o1test/qual1.output"
21   perl runstdtest hugs +q -pHugs: -s13 "-Otest/qual2.hs"  "-o1test/qual2.output"
22   perl runstdtest hugs +q -pHugs: -s13 "-Otest/qual3.hs"  "-o1test/qual3.output"
23   perl runstdtest hugs +q -pHugs: -s13 "-Otest/qual4.hs"  "-o1test/qual4.output"
24   perl runstdtest hugs +q -pHugs: -s13 "-Otest/qual5.hs"  "-o1test/qual5.output"
25   perl runstdtest hugs +q -pHugs: -s17 "-Otest/syntax.hs" "-o1test/syntax.output"
26
27   # ToDo: test for duplicate modules 
28   perl runstdtest hugs -O-i +q -pHugs: -s13 "-Otest/mod1.hs"   "-o1test/mod1.output"
29   perl runstdtest hugs -O-i +q -pHugs: -s13 "-Otest/mod2.hs"   "-o1test/mod2.output"
30   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod3.hs"   "-o1test/mod3.output"
31   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod4.hs"   "-o1test/mod4.output"
32   perl runstdtest hugs +q -pHugs: -s17 "-Otest/mod5.hs"   "-o1test/mod5.output"
33   perl runstdtest hugs +q -pHugs: -s17 "-Otest/mod6.hs"   "-o1test/mod6.output"
34   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod7.hs"   "-o1test/mod7.output"
35   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod8.hs"   "-o1test/mod8.output"
36   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod9.hs"   "-o1test/mod9.output"
37
38   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod10.hs"  "-o1test/mod10.output"
39   perl runstdtest hugs +q -pHugs: -s18 "-Otest/mod11.hs"  "-o1test/mod11.output"
40   perl runstdtest hugs +q -pHugs: -s18 "-Otest/mod12.hs"  "-o1test/mod12.output"
41   perl runstdtest hugs +q -pHugs: -s17 "-Otest/mod13.hs"  "-o1test/mod13.output"
42   perl runstdtest hugs +q -pHugs: -s17 "-Otest/mod14.hs"  "-o1test/mod14.output"
43   perl runstdtest hugs +q -pHugs: -s18 "-Otest/mod15.hs"  "-o1test/mod15.output"
44   perl runstdtest hugs +q -pHugs: -s18 "-Otest/mod16.hs"  "-o1test/mod16.output"
45   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod17.hs"  "-o1test/mod17.output"
46   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod18.hs"  "-o1test/mod18.output"
47   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod19.hs"  "-o1test/mod19.output"
48
49   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod20.hs"  "-o1test/mod20.output"
50   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod21.hs"  "-o1test/mod21.output"
51   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod22.hs"  "-o1test/mod22.output"
52   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod23.hs"  "-o1test/mod23.output"
53   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod24.hs"  "-o1test/mod24.output"
54   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod25.hs"  "-o1test/mod25.output"
55   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod26.hs"  "-o1test/mod26.output"
56   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod27.hs"  "-o1test/mod27.output"
57   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod28.hs"  "-o1test/mod28.output"
58   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod29.hs"  "-o1test/mod29.output"
59
60   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod30.hs"  "-o1test/mod30.output"
61   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod31.hs"  "-o1test/mod31.output"
62   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod32.hs"  "-o1test/mod32.output"
63   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod33.hs"  "-o1test/mod33.output"
64   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod34.hs"  "-o1test/mod34.output"
65   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod35.hs"  "-o1test/mod35.output"
66   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod36.hs"  "-o1test/mod36.output"
67   perl runstdtest hugs +q -pHugs: -s18 "-Otest/mod37.hs"  "-o1test/mod37.output"
68   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod38.hs"  "-o1test/mod38.output"
69   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod39.hs"  "-o1test/mod39.output"
70
71   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod40.hs"  "-o1test/mod40.output"
72   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod41.hs"  "-o1test/mod41.output"
73   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod42.hs"  "-o1test/mod42.output"
74   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod43.hs"  "-o1test/mod43.output"
75   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod44.hs"  "-o1test/mod44.output"
76   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod45.hs"  "-o1test/mod45.output"
77   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod46.hs"  "-o1test/mod46.output"
78   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod47.hs"  "-o1test/mod47.output"
79   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod48.hs"  "-o1test/mod48.output"
80   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod49.hs"  "-o1test/mod49.output"
81
82   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod50.hs"  "-o1test/mod50.output"
83   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod51.hs"  "-o1test/mod51.output"
84   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod52.hs"  "-o1test/mod52.output"
85   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod53.hs"  "-o1test/mod53.output"
86   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod54.hs"  "-o1test/mod54.output"
87   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod55.hs"  "-o1test/mod55.output"
88   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod56.hs"  "-o1test/mod56.output"
89   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod57.hs"  "-o1test/mod57.output"
90   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod58.hs"  "-o1test/mod58.output"
91   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod59.hs"  "-o1test/mod59.output"
92
93   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod60.hs"  "-o1test/mod60.output"
94   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod61.hs"  "-o1test/mod61.output"
95   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod62.hs"  "-o1test/mod62.output"
96   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod63.hs"  "-o1test/mod63.output"
97   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod64.hs"  "-o1test/mod64.output"
98   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod65.hs"  "-o1test/mod65.output"
99   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod66.hs"  "-o1test/mod66.output"
100   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod67.hs"  "-o1test/mod67.output"
101   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod68.hs"  "-o1test/mod68.output"
102   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod69.hs"  "-o1test/mod69.output"
103
104   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod70.hs"  "-o1test/mod70.output"
105   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod71.hs"  "-o1test/mod71.output"
106   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod72.hs"  "-o1test/mod72.output"
107   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod73.hs"  "-o1test/mod73.output"
108   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod74.hs"  "-o1test/mod74.output"
109   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod75.hs"  "-o1test/mod75.output"
110   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod76.hs"  "-o1test/mod76.output"
111   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod77.hs"  "-o1test/mod77.output"
112   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod78.hs"  "-o1test/mod78.output"
113   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod79.hs"  "-o1test/mod79.output"
114
115   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod80.hs"  "-o1test/mod80.output"
116   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod81.hs"  "-o1test/mod81.output"
117   perl runstdtest hugs +q -pHugs: -s17 "-Otest/mod82.hs"  "-o1test/mod82.output"
118   perl runstdtest hugs +q -pHugs: -s17 "-Otest/mod83.hs"  "-o1test/mod83.output"
119   perl runstdtest hugs +q -pHugs: -s18 "-Otest/mod84.hs"  "-o1test/mod84.output"
120   perl runstdtest hugs +q -pHugs: -s18 "-Otest/mod85.hs"  "-o1test/mod85.output"
121   perl runstdtest hugs +q -pHugs: -s18 "-Otest/mod86.hs"  "-o1test/mod86.output"
122   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod87.hs"  "-o1test/mod87.output"
123   perl runstdtest hugs +q -pHugs: -s18 "-Otest/mod88.hs"  "-o1test/mod88.output"
124   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod89.hs"  "-o1test/mod89.output"
125
126   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod90.hs"  "-o1test/mod90.output"
127   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod91.hs"  "-o1test/mod91.output"
128   perl runstdtest hugs +q -pHugs: -s17 "-Otest/mod92.hs"  "-o1test/mod92.output"
129   perl runstdtest hugs +q -pHugs: -s17 "-Otest/mod93.hs"  "-o1test/mod93.output"
130   perl runstdtest hugs +q -pHugs: -s18 "-Otest/mod94.hs"  "-o1test/mod94.output"
131   perl runstdtest hugs +q -pHugs: -s18 "-Otest/mod95.hs"  "-o1test/mod95.output"
132   perl runstdtest hugs +q -pHugs: -s18 "-Otest/mod96.hs"  "-o1test/mod96.output"
133   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod97.hs"  "-o1test/mod97.output"
134   perl runstdtest hugs +q -pHugs: -s13 "-Otest/mod98.hs"  "-o1test/mod98.output"
135
136   # Check opaque import/export of tycons
137   perl runstdtest hugs +q -pHugs: -s21 "-Otest/T2.hs"  "-o1test/T2.output"
138   # Check transparent import of type synonyms
139   perl runstdtest hugs +q -pHugs: -s18 "-Otest/T3.hs"  "-o1test/T3.output"
140
141   perl runstdtest hugs +q -pHugs: -s13 "-Otest/export1.hs"  "-o1test/export1.output"
142
143   # Check opaque import/export of member functions
144   perl runstdtest hugs +q -pHugs: -s20 "-Otest/T7.hs"  "-o1test/Loaded.output"
145
146 } # End of static tests
147
148 test_tcheck() {
149
150   echo "\
151 ----------------------------------------------------------------
152 -- Testing type checking.
153 -- This group of checks will produce about 7 lines of output of the form
154 -- 
155 -- --!!! <description of feature being tested>
156 -- 
157 -- It may also produce output that looks like this:
158 -- 
159 --   ./hugs +q -pHugs:  test/dicts.hs < test/dicts.input
160 --   expected stdout not matched by reality
161 --   *** test/dicts.output  Fri Jul 11 13:25:27 1997
162 --   --- /tmp/runtest3584.3  Fri Jul 11 15:55:13 1997
163 --   ***************
164 --   *** 1,3 ****
165 --     Hugs:\"(14,14,14)\"
166 --   ! Hugs:Garbage collection recovered 93815 cells
167 --     Hugs:\"(14,14,14)\"
168 --   --- 1,3 ----
169 --     Hugs:\"(14,14,14)\"
170 --   ! Hugs:Garbage collection recovered 93781 cells
171 --     Hugs:\"(14,14,14)\"
172 -- 
173 -- This is harmless and might be caused by minor variations between different
174 -- machines, or slightly out of date sample output.
175 -- 
176 -- You should report a problem if any other output is generated.
177 ----------------------------------------------------------------"
178
179   perl runstdtest hugs +q -pHugs: -s18 "-Otest/types.hs"  "-o1test/types.output"
180   perl runstdtest hugs +q -pHugs: -s18 "-Otest/dicts.hs"  "-itest/dicts.input" "-o1test/dicts.output"
181   perl runstdtest hugs +q -pHugs: -s13 "-Otest/ty1.hs"    "-o1test/ty1.output"
182   perl runstdtest hugs +q -pHugs: -s13 "-Otest/ty2.hs"    "-o1test/ty2.output"
183   perl runstdtest hugs +q -pHugs: -s17 "-Otest/monad.hs"  "-o1test/monad.output"
184   # Very tricky test - the input script uses /bin/cp to mimic the
185   # effect of editing a file and reloading
186   perl runstdtest hugs -w +q -pHugs: -s13 "-itest/DictHW.input" "-o1test/DictHW.output"
187   perl runstdtest hugs -w +q -pHugs: test/TyErr.hs -s12 "-o1test/TyErr.output"
188 }
189
190 test_rts() {
191
192   echo "\
193 ----------------------------------------------------------------
194 -- Testing runtime system.
195 -- This group of checks will produce 12-16 lines of output of the form
196 -- 
197 -- --!!! <description of feature being tested>
198 -- 
199 -- It may also produce output that looks like this:
200 -- 
201 --   ./hugs +q -pHugs:  test/???.hs < test/???.input
202 --   expected stdout not matched by reality
203 --   *** test/???.output  Fri Jul 11 13:25:27 1997
204 --   --- /tmp/runtest3584.3  Fri Jul 11 15:55:13 1997
205 --   ***************
206 --   *** 1,3 ****
207 --     ...
208 --   | Hugs:\"[0.0, 0.304693, 0.643501, 1.5708]\"
209 --     ...
210 --   --- 1,3 ----
211 --     ...
212 --   | Hugs:\"[0.0, 0.30469323452, 0.643503234321, 1.5708234234]\"
213 --     ...
214 -- 
215 -- This is harmless and reflects variations in the accuracy of floating
216 -- point representation, calculations and printing.
217 -- 
218 -- You should report a problem if any other output is generated or if
219 -- the size of the floating point errors seem excessively large.
220 ----------------------------------------------------------------"
221
222   # Test bignums early since printing depends on bignums
223   perl runstdtest hugs +q -pHugs: -s18 "-Otest/bignums.hs" "-itest/bignums.input" "-o1test/bignums.output"
224
225   # Using generic printer
226   perl runstdtest hugs +q -pHugs: -u    -s18 "-Otest/print.hs"  "-itest/print.input" "-o1test/print1.output"
227   perl runstdtest hugs +q -pHugs: -u -f -s18 "-Otest/print.hs"  "-itest/print.input" "-o1test/print2.output"
228   #perl runstdtest hugs +q -pHugs: -u -f -s18 "-Otest/catch.hs"  "-itest/catch.input" "-o1test/catch.output"
229   perl runstdtest hugs +q -pHugs: -u    -s18 "-Otest/enum.hs"   "-itest/enum.input"  "-o1test/enum.output1"
230   perl runstdtest hugs +q -pHugs: -u   -s18 "-Otest/infix.hs"   "-itest/infix.input"  "-o1test/infix.output"
231
232   # Using derived show instance
233   #perl runstdtest hugs +q -pHugs: +u -f -s18 "-Otest/catch2.hs" "-itest/catch.input" "-o1test/catch2.output"
234
235   # Using derived instances
236   perl runstdtest hugs +q -pHugs: +u    -s18 "-Otest/enum.hs"   "-itest/enum.input"  "-o1test/enum.output2"
237   perl runstdtest hugs +q -pHugs: +u    -s18 "-Otest/maxint.hs"   "-itest/maxint.input"  "-o1test/maxint.output"
238   perl runstdtest hugs +q -pHugs: -s18 "-Otest/ord.hs" "-itest/ord.input" "-o1test/ord.output"
239   perl runstdtest hugs +q -pHugs: -s25 "-Otest/read.hs" "-itest/read.input" "-o1test/read.output"
240   perl runstdtest hugs +q -pHugs: -s18 "-Otest/arith.hs" "-itest/arith.input" "-o1test/arith.output"
241
242   perl runstdtest hugs +q -pHugs: -s18 "-Otest/testlist.hs"  "-itest/testlist.input" "-o1test/testlist.output"
243
244   perl runstdtest hugs +q -pHugs: -s29 "-Otest/arrayt.hs" "-itest/array1.input" "-o1test/array1.output"
245   perl runstdtest hugs +q -pHugs: -s29 "-Otest/array2.hs" "-itest/array2.input" "-o1test/array2.output"
246   perl runstdtest hugs +q -pHugs: -s29 "-Otest/arrayEx.hs" "-itest/arrayEx.input" "-o1test/arrayEx.output"
247
248
249   # Old test code from hugs +q -pHugs:0 - it will probably get resurrected at some stage
250   # 
251   # if TESTREFS
252   # if IO_REFS
253   #   perl runstdtest hugs +q -pHugs: "-Otest/refs.hs" "-itest/refs.input" "-o1test/refs.output"
254   # fi
255   # else
256   # echo "Not testing Refs"
257   # fi
258   # 
259   # if TESTPTREQ
260   # if IO_REFS
261   #   perl runstdtest hugs +q -pHugs: "-Otest/ptrEq.hs" "-itest/ptrEq.input" "-o1test/ptrEq.output"
262   # fi
263   # else
264   # echo "Not testing Pointer equality"
265   # fi
266   # 
267   # if TESTMUTVARS
268   # if ST_MUTVARS
269   #   perl runstdtest hugs +q -pHugs: "-Otest/mutvars.hs" "-itest/mutvars.input" "-o1test/mutvars.output"
270   # fi
271   # else
272   # echo "Not testing MutVars"
273   # fi
274   # 
275   # if TESTIOERROR
276   # if !OLD_IOMONAD
277   #   perl runstdtest hugs +q -pHugs: "-Otest/ioerror1.hs" "-itest/ioerror1.input" "-o1test/ioerror1.output"
278   #   perl runstdtest hugs +q -pHugs: "-Otest/ioerror2.hs" "-itest/ioerror2.input" "-o1test/ioerror2.output"
279   # if IO_HANDLES
280   # /* Create an unreadable file (its impossible to supply one in a tar file!) */
281   # cat >test/unreadable.tst <<EOF
282   # This file should be read+q -protected.
283   #   perl runstdtests/iohandle.hs attempts to write it.
284   # EOF
285   # CHMOD 200 "test/unreadable.tst"
286   #   perl runstdtest hugs +q -pHugs: "-Otest/iohandle.hs" "-itest/iohandle.input" "-o1test/iohandle.output"
287   # RM "test/unreadable.tst"
288   # fi
289   # fi /* !OLD_IOMONAD */
290   # else
291   # echo "Not testing IOError"
292   # fi /* TESTIOERROR */
293   # 
294   # if TESTCONCURRENCY
295   # if CONCURRENCY
296   #   perl runstdtest hugs +q -pHugs: "-Otest/mvar.hs" "-itest/mvar.input" "-o1test/mvar.output"
297   # fi
298   # else
299   # echo "Not testing concurrency"
300   # fi
301   # 
302   # if TESTGC
303   #   perl runstdtest hugs +q -pHugs:          "-Otest/gc.hs" "-itest/gc1.input" "-o1test/gc1.output"
304   #   perl runstdtest hugs +q -pHugs: -H200000" "-Otest/gc.hs" "-itest/gc1.input" "-o1test/gc1.output"
305   #   perl runstdtest hugs +q -pHugs: -H100000" "-Otest/gc.hs" "-itest/gc2.input" "-o1test/gc2.output"
306   # else
307   # echo "Not testing GC"
308   # fi
309   # 
310   # else
311   # echo "Not testing runtime system"
312   # fi
313
314 } # End of test_rts
315
316 test_libs() {
317   echo "\
318 ----------------------------------------------------------------
319 -- Testing standard libraries for static errors and some old bugs.
320 -- 
321 -- This group of checks tests that each of the standard libraries
322 -- loads correctly.  This generates no output if it works.
323 -- It also tests the results generated by a few of the standard
324 -- libraries.  This produces the following output.
325 -- 
326 --   --!!! Performing static tests on standard libraries - please wait
327 --   --!!! Performing static tests on GHC-compatible libraries
328 --   --!!! Performing static tests on Hugs libraries
329 --   --!!! Performing static tests on Haskore libraries
330 --   --!!! Performing dynamic tests on libraries
331 --   --!!! Testing (List.\\) and related functions
332 --   --!!! Testing System
333 --   --!!! Testing Int and Word
334 -- 
335 -- On Windows, it may also produce output that looks like this:
336 -- 
337 --   ./hugs +q -pHugs:  test/system1.hs < test/system1.input
338 --   expected stdout not matched by reality
339 --   *** test/system1.output  Fri Jul 11 13:25:27 1997
340 --   --- /tmp/runtest3584.3  Fri Jul 11 15:55:13 1997
341 --   ***************
342 --   *** 1,3 ****
343 --     ...
344 --   | Hugs:ExitFailure 1
345 --   | Hugs:ExitFailure 2
346 --     ...
347 --   --- 1,3 ----
348 --     ...
349 --   | Hugs:ExitSuccess
350 --   | Hugs:ExitSuccess
351 --     ...
352 -- 
353 -- This reflects the sad fact that System.system always returns
354 -- ExitSuccess on DOS machines.  This is a known bug in DOS.
355 -- 
356 -- You should report a problem if any other output is generated.
357 ----------------------------------------------------------------"
358
359   echo "--!!! Performing static tests on standard libraries - please wait"
360   perl runstdtest hugs +q -pHugs: Array   -s27
361   perl runstdtest hugs +q -pHugs: Char    -s19
362   perl runstdtest hugs +q -pHugs: Complex -s19
363   perl runstdtest hugs +q -pHugs: IO      -s24
364   perl runstdtest hugs +q -pHugs: Ix      -s19
365   perl runstdtest hugs +q -pHugs: List    -s22
366   perl runstdtest hugs +q -pHugs: Maybe   -s19
367   perl runstdtest hugs +q -pHugs: Monad   -s19
368   perl runstdtest hugs +q -pHugs: Ratio   -s19
369   perl runstdtest hugs +q -pHugs: System  -s19
370
371   echo "--!!! Performing static tests on GHC-compatible libraries"
372   perl runstdtest hugs +q -pHugs: IOExts     -s27 "-o1test/Loaded.output"
373   perl runstdtest hugs +q -pHugs: ST         -s33 "-o1test/Loaded.output"
374   perl runstdtest hugs +q -pHugs: LazyST     -s33 "-o1test/Loaded.output"
375   perl runstdtest hugs +q -pHugs: Concurrent -s42 "-o1test/Loaded.output"
376   perl runstdtest hugs +q -pHugs: Addr       -s17 "-o1test/Loaded.output"
377   perl runstdtest hugs +q -pHugs: Word       -s22 "-o1test/Loaded.output"
378   perl runstdtest hugs +q -pHugs: Int        -s20 "-o1test/Loaded.output"
379
380   echo "--!!! Performing static tests on Hugs libraries"
381   perl runstdtest hugs +q -pHugs: HugsLibs -s68 "-o1test/HugsLibs.output"
382
383   echo "--!!! Performing static tests on Haskore libraries"
384   perl runstdtest hugs +q -pHugs: Haskore -s60 "-o1test/Loaded.output"
385
386   echo "--!!! Performing dynamic tests on libraries"
387   # Specific tests - checking that old bugs have been fixed 
388   perl runstdtest hugs +q -pHugs: List    -s22 "-Otest/list1.hs" "-itest/list1.input" "-o1test/list1.output"
389   perl runstdtest hugs +q -pHugs: System  -s19 "-Otest/system1.hs" "-itest/system1.input" "-o1test/system1.output"
390   perl runstdtest hugs +q -pHugs: Complex -s17 "-itest/complex1.input" "-o1test/complex1.output"
391   perl runstdtest hugs +q -pHugs: Int     -s25 "-Otest/intTest.hs" "-itest/intTest.input" "-o1test/intTest.output"
392   perl runstdtest hugs +q -pHugs: test/FixIO.lhs -s33 "-itest/FixIO.input" "-o1test/FixIO.output"
393
394 } # End of test_libs
395
396 test_demos() {
397   echo "\
398 ----------------------------------------------------------------
399 -- Testing demos for static errors.
400 -- 
401 -- This group of checks tests that each of the demos loads correctly.
402 -- It should generate this output:
403 -- 
404 --   --!!! Performing static checks on demos
405 --   --!!! Performing static checks on Haskore demos
406 -- 
407 -- You should report a problem if any other output is generated.
408 ----------------------------------------------------------------"
409
410   echo "--!!! Performing static checks on demos"
411   perl runstdtest hugs -w +q -pHugs: ../demos/Demos       -s58 "-o1test/Loaded.output"
412   perl runstdtest hugs -w +q -pHugs: ../demos/prolog/Main -s23 "-o1test/Loaded.output"
413   perl runstdtest hugs -w +q -pHugs: ../demos/cgi/Counter -s30 "-o1test/Loaded.output"
414
415   # Test that Haskore demos load successfully
416   echo "--!!! Performing static checks on Haskore demos"
417   perl runstdtest hugs -w +q -pHugs: ../lib/Haskore/demos/HaskoreExamples -s42 "-o1test/Loaded.output"
418   perl runstdtest hugs -w +q -pHugs: ../lib/Haskore/demos/SelfSim      -s40 "-o1test/Loaded.output"
419   perl runstdtest hugs -w +q -pHugs: ../lib/Haskore/demos/ChildSong6   -s40 "-o1test/Loaded.output"
420
421 } # End of test demos
422
423 test_temp() {
424   echo "\
425 ----------------------------------------------------------------
426 -- Testing temporary tests
427 -- These aren't invoked by the usual "make check" - they serve
428 -- as a marshalling area when adding new tests
429 ----------------------------------------------------------------"
430
431 } # End of test temp
432
433 case "$1" in
434 static) test_static;;
435 tcheck) test_tcheck;;
436 rts)    test_rts;;
437 libs)   test_libs;;
438 demos)  test_demos;;
439 temp)   test_temp;;
440 *)      echo Unknown test $1;;
441 esac
442
443 echo "----------------------------------------------------------------"
444