Add a test for #2507; we should get `' quotes if unicode quotes don't work
[ghc.git] / testsuite / tests / driver / all.T
1 setTestOpts(only_compiler_types(['ghc']))
2
3 test('driver011',
4      extra_clean(['A011.hi', 'A011.o']),
5      run_command,
6      ['$MAKE -s --no-print-directory test011'])
7
8 test('driver012',
9      extra_clean(['A012.hi', 'A012.ooo']),
10      run_command,
11      ['$MAKE -s --no-print-directory test012'])
12
13 test('driver013',
14      extra_clean(['A013.xhi', 'A013.o']),
15      run_command,
16      ['$MAKE -s --no-print-directory test013'])
17
18 test('driver014',
19      extra_clean(['A014.hi', 'obj014/A014.o', 'obj014']),
20      run_command,
21      ['$MAKE -s --no-print-directory test014'])
22
23 test('driver015',
24      extra_clean(['A015.o', 'hi015/A015.hi', 'hi015']),
25      run_command,
26      ['$MAKE -s --no-print-directory test015'])
27
28 test('driver016',
29      extra_clean(['F016.hi', 'F016.o', 'F016_stub.h']),
30      run_command,
31      ['$MAKE -s --no-print-directory test016'])
32
33 test('driver017',
34      extra_clean(['F017.hi', 'F017.o',
35                   'stub017/TestStub017_stub.h', 'stub017/']),
36      run_command,
37      ['$MAKE -s --no-print-directory test017'])
38
39 test('driver018',
40      extra_clean(['F018.hi', 'F018_stub.h',
41                   'obj018/TestStub018.o', 'obj018/TestStub018_stub.o',
42                   'obj018']),
43      run_command,
44      ['$MAKE -s --no-print-directory test018'])
45
46 test('driver018a',
47      extra_clean(['F018a.hi', 'F018a_stub.h',
48                   'F018a.obj.018']),
49      run_command,
50      ['$MAKE -s --no-print-directory test018a'])
51
52 test('driver019',
53      extra_clean(['out019/TestStub019.hi',
54                   'out019/TestStub019.o',
55                   'out019/TestStub019_stub.h',
56                   'out019/TestStub019_stub.o']),
57      run_command,
58      ['$MAKE -s --no-print-directory test019'])
59
60 test('driver021',
61      extra_clean(['B021/C.hi', 'B021/C.o']),
62      run_command,
63      ['$MAKE -s --no-print-directory test021'])
64
65 test('driver022',
66      extra_clean(['B022/C.hi', 'B022/C.ooo']),
67      run_command,
68      ['$MAKE -s --no-print-directory test022'])
69
70 test('driver023',
71      extra_clean(['B023/C.xhi', 'B023/C.o']),
72      run_command,
73      ['$MAKE -s --no-print-directory test023'])
74
75 test('driver024',
76      extra_clean(['B024/C.hi', 'obj024/B024/C.o', 'obj024/B024', 'obj024']),
77      run_command,
78      ['$MAKE -s --no-print-directory test024'])
79
80 test('driver024a',
81      extra_clean(['obj024a/B024a/stub.o', 'obj024a/B024a', 'obj024a',
82                   'B024a/stub.c', 'B024a/']),
83      run_command,
84      ['$MAKE -s --no-print-directory test024a'])
85
86 test('driver025',
87      extra_clean(['B025/C.hi', 'B025/C.o',
88                   'hi025/B025/C.hi', 'hi025/B025', 'hi025']),
89      run_command,
90      ['$MAKE -s --no-print-directory test025'])
91
92 test('driver026',
93      extra_clean(['d026/P/Q.hi', 'd026/P/Q.o']),
94      run_command,
95      ['$MAKE -s --no-print-directory test026'])
96
97 test('driver027',
98      extra_clean(['B027/F.hi', 'B027/F.o',
99                   'B027/F_stub.h', 'B027/F_stub.o']),
100      run_command,
101      ['$MAKE -s --no-print-directory test027'])
102
103 test('driver028',
104      extra_clean(['B028/F.hi', 'B028/F.o',
105                   'stub028/B028/F_stub.h', 'stub028/B028/', 'stub028/']),
106      run_command,
107      ['$MAKE -s --no-print-directory test028'])
108
109 test('driver031',
110      extra_clean(['A031.hi', 'A031.o']),
111      run_command,
112      ['$MAKE -s --no-print-directory test031'])
113
114 test('driver032',
115      extra_clean(['A032.hi', 'obj032/A032.o', 'obj032/']),
116      run_command,
117      ['$MAKE -s --no-print-directory test032'])
118
119 test('driver033',
120      extra_clean(['A033.hi', 'A033.o', 'hi033/A033.hi', 'hi033']),
121      run_command,
122      ['$MAKE -s --no-print-directory test033'])
123
124 test('driver034',
125      extra_clean(['F034.hi', 'F034.o', 'F034_stub.h']),
126      run_command,
127      ['$MAKE -s --no-print-directory test034'])
128
129 test('driver035',
130      extra_clean(['F035.hi', 'F035.o',
131                   'stub035/TestStub035_stub.h', 'stub035/']),
132      run_command,
133      ['$MAKE -s --no-print-directory test035'])
134
135 test('driver041',
136      extra_clean(['B041/C.hi', 'B041/C.o']),
137      run_command,
138      ['$MAKE -s --no-print-directory test041'])
139
140 test('driver042',
141      extra_clean(['B042/C.hi', 'obj042/B042/C.o', 'obj042/B042/', 'obj042/']),
142      run_command,
143      ['$MAKE -s --no-print-directory test042'])
144
145 test('driver043',
146      extra_clean(['B043/C.hi', 'B043/C.o',
147                   'hi043/B043/C.hi', 'hi043/B043', 'hi043']),
148      run_command,
149      ['$MAKE -s --no-print-directory test043'])
150
151 test('driver044',
152      extra_clean(['B044/F.hi', 'B044/F.o',
153                   'B044/F_stub.h', 'B044/F_stub.o']),
154      run_command,
155      ['$MAKE -s --no-print-directory test044'])
156
157 test('driver045',
158      extra_clean(['B045/F.hi', 'B045/F.o',
159                   'stub045/B045/F_stub.h', 'stub045/B045/', 'stub045/']),
160      run_command,
161      ['$MAKE -s --no-print-directory test045'])
162
163 test('driver051',
164      extra_clean(['d051_1/P/Q.hi', 'd051_1/P/Q.o',
165                   'd051_2/R/S.hi', 'd051_2/R/S.o']),
166      run_command,
167      ['$MAKE -s --no-print-directory test051'])
168
169 test('driver052',
170      extra_clean(['d052_1/P/Q.hi', 'd052_1/P/Q.o',
171                   'd052_2/R/S.hi', 'd052_2/R/S.o',
172                   'obj052/P/Q.o', 'obj052/P',
173                   'obj052/R/S.o', 'obj052/R',
174                   'obj052']),
175      run_command,
176      ['$MAKE -s --no-print-directory test052'])
177
178 test('driver053',
179      extra_clean(['d053_1/P/Q.hi', 'd053_1/P/Q.o',
180                   'd053_2/R/S.hi', 'd053_2/R/S.o',
181                   'hi053/P/Q.hi', 'hi053/P',
182                   'hi053/R/S.hi', 'hi053/R',
183                   'hi053']),
184      run_command,
185      ['$MAKE -s --no-print-directory test053'])
186
187 test('driver061a',
188      extra_clean(['A061a.hi', 'A061a.o', 'A061a.s']),
189      run_command,
190      ['$MAKE -s --no-print-directory test061a'])
191
192 test('driver061b',
193      extra_clean(['A061b.hi', 'A061b.o', 'A061b.s']),
194      run_command,
195      ['$MAKE -s --no-print-directory test061b'])
196
197
198 test('driver062a',
199      extra_clean(['Hello062a.hs', 'Hello062a.hi', 'Hello062a.o',
200                   'hello062a', 'hello062a.exe']),
201      run_command,
202      ['$MAKE -s --no-print-directory test062a'])
203 test('driver062b',
204      extra_clean(['Hello062b.hs', 'Hello062b.hi', 'Hello062b.o',
205                   'hello062b', 'hello062b.exe']),
206      run_command,
207      ['$MAKE -s --no-print-directory test062b'])
208 test('driver062c',
209      extra_clean(['Hello062c.hs', 'Hello062c.hi', 'Hello062c.o',
210                   'hello062c', 'hello062c.exe']),
211      run_command,
212      ['$MAKE -s --no-print-directory test062c'])
213 test('driver062d',
214      extra_clean(['B062d/Hello062d.hi', 'B062d/Hello062d.o',
215                   'B062d/Hello062d.hs', 'B062d/',
216                   'hello062d', 'hello062d.exe']),
217      run_command,
218      ['$MAKE -s --no-print-directory test062d'])
219 test('driver062e',
220      extra_clean(['B062e/Hello062e.hi', 'B062e/Hello062e.o',
221                   'B062e/Hello062e.hs', 'B062e/',
222                   'hello062e', 'hello062e.exe']),
223      run_command,
224      ['$MAKE -s --no-print-directory test062e'])
225
226 test('driver063',
227      extra_clean(['A063.hi', 'A063.o', 'A063.hc',
228                   'D063.hi', 'D063.o', 'D063.hc']),
229      run_command,
230      ['$MAKE -s --no-print-directory test063'])
231
232 test('driver064',
233      extra_clean(['A064.hi', 'A064.o', 'A064.hspp']),
234      run_command,
235      ['$MAKE -s --no-print-directory test064'])
236
237 test('driver065',
238      extra_clean(['A065.hi', 'A065.o', 'A065.hspp']),
239      run_command,
240      ['$MAKE -s --no-print-directory test065'])
241
242 test('driver066',
243      extra_clean(['A066.hi', 'A066.o', 'A066.tmp']),
244      run_command,
245      ['$MAKE -s --no-print-directory test066'])
246
247 test('driver067',
248      extra_clean(['A067.hi', 'A067.o', 'A067.tmp']),
249      run_command,
250      ['$MAKE -s --no-print-directory test067'])
251
252 test('driver070',
253      extra_clean(['A070.hi', 'A070.o', 'A070.s']),
254      run_command,
255      ['$MAKE -s --no-print-directory test070'])
256
257 test('driver071',
258      extra_clean(['A071.hi', 'A071.o', 'A071.tmp']),
259      run_command,
260      ['$MAKE -s --no-print-directory test071'])
261
262 test('driver081a',
263      extra_clean(['Test_081a.hs', 'Test_081a.hi', 'Test_081a.o',
264                   'Test_081a', 'Test_081a.exe']),
265      run_command,
266      ['$MAKE -s --no-print-directory test081a'])
267
268 test('driver081b',
269      extra_clean(['Test.081b.hs', 'Test.081b.hi', 'Test.081b.o',
270                   'Test.081b', 'Test.081b.exe']),
271      run_command,
272      ['$MAKE -s --no-print-directory test081b'])
273
274 test('driver100',
275      extra_clean(['overlap/List.hi', 'overlap/List.o',
276                   'overlap/Overlap.hi', 'overlap/Overlap.o']),
277      run_command,
278      ['$MAKE -s --no-print-directory test100'])
279
280 test('driver200',
281      extra_clean(['depend200', 'depend200.bak']),
282      run_command,
283      ['$MAKE -s --no-print-directory test200'])
284
285 test('T2566',
286      normalise_fun(normalise_errmsg),
287      run_command,
288      ['$MAKE -s --no-print-directory T2566'])
289
290 test('pragma001', normal, compile, [''])
291 test('pragma002', normal, compile, [''])
292
293 test('T2499', normal, compile_fail, [''])
294
295 test('mode001', normal, run_command,
296      ['$MAKE -s --no-print-directory mode001'])
297
298 if config.os == 'mingw32':
299      only_windows = normal
300 else:
301      only_windows = skip
302
303 test('shared001',
304      [only_windows,
305       extra_clean(['Shared001.hi', 'Shared001.o', 'HSdll.dll.a', 'HSdll.dll', 'Shared001_stub.h', 'Shared001_stub.o'])],
306      run_command,
307      ['$MAKE -s --no-print-directory shared001'])
308
309 test('dynHelloWorld',
310      only_ways(['dyn']),
311      compile_and_run,
312      [''])
313
314 test('T5313', extra_run_opts('"' + config.libdir + '"'), compile_and_run, ['-package ghc'])
315
316 test('T2464', normal, compile, [''])
317 test('T3674',
318      [ignore_output,
319       extra_clean(['T3674_pre.hi', 'T3674_pre.o', 'T3674_pre', 'T3674_pre.exe'])],
320      run_command, 
321      ['$MAKE -s --no-print-directory T3674'])
322
323 test('rtsopts001',
324      extra_clean(['rtsOpts.hi', 'rtsOpts.o', 'rtsOpts', 'rtsOpts.exe']),
325      run_command,
326      ['$MAKE -s --no-print-directory rtsopts001'])
327 test('rtsopts002', normal, run_command,
328                 ['$MAKE -s --no-print-directory rtsopts002'])
329
330 test('withRtsOpts', [ extra_clean(['withRtsOpts', 'withRtsOpts.exe',
331                                    'withRtsOpts.hi', 'withRtsOpts.o',
332                                    'withRtsOpts.out']) ],
333                     run_command,
334                     ['$MAKE -s --no-print-directory withRtsOpts'])
335 test('T3389', normal, compile_and_run, [''])
336 test('T3364', normalise_fun(normalise_errmsg), run_command,
337      ['$MAKE -s --no-print-directory T3364'])
338 test('T4437', only_ways(['normal']), compile_and_run, ['-package ghc'])
339
340 test('werror', normal, compile_fail, [''])
341
342 test('T706',
343      [req_interp,
344       extra_clean(['T706.hs'])],
345      run_command,
346      ['$MAKE -s --no-print-directory T706'])
347 test('spacesInArgs',
348      extra_run_opts('"a   b"   "c   d"'),
349      compile_and_run,
350      [''])
351
352 test('T5584', normal, run_command,
353         ['$MAKE -s --no-print-directory T5584'])
354 test('T5198', extra_clean(['T5198dump/T5198.dump-simpl', 'T5198dump']),
355      run_command,
356      ['$MAKE -s --no-print-directory T5198'])
357 test('T7060',
358      extra_clean(['T7060dump/T7060.dump-rules',
359                   'T7060dump/T7060.dump-rule-firings',
360                   'T7060dump/T7060.dump-rule-rewrites',
361                   'T7060dump']),
362      run_command,
363      ['$MAKE -s --no-print-directory T7060'])
364 test('T7130', normal, compile_fail, ['-fflul-laziness'])
365 test('T7563', when(unregisterised(), skip), run_command,
366      ['$MAKE -s --no-print-directory T7563'])
367 test('T6037', expect_broken(6037), run_command,
368      ['$MAKE -s --no-print-directory T6037'])
369 test('T2507', normal, run_command, ['$MAKE -s --no-print-directory T2507'])
370