Change Safe Haskell tests for new -fpackage-trust flag
[ghc.git] / testsuite / tests / safeHaskell / safeLanguage / all.T
1 # safeLanguage tests are all about making sure the correct
2 # unsafe language extensions are disabled or restricted
3 # in the -XSafe language. Basically testing that -XSafe
4 # works correctly (incluidng testing safe imports a little).
5
6 # Just do the normal way, SafeHaskell is all in the frontend
7 def f( opts ):
8   opts.only_ways = ['normal']
9
10 setTestOpts(f)
11
12 test('SafeLang01', normal, compile, ['-trust base'])
13 test('SafeLang02', normal, compile, ['-trust base'])
14 test('SafeLang03', normal, compile, ['-trust base'])
15 test('SafeLang04', normal, compile_and_run, [''])
16 test('SafeLang05', normal, compile_and_run, ['-trust base'])
17 test('SafeLang06',
18      extra_clean(['SafeLang06_A.o', 'SafeLang06_A.hi']),
19      compile_and_run,
20      [''])
21 test('SafeLang07', normal, compile_fail, [''])
22 test('SafeLang08', normal, compile_fail, [''])
23 test('SafeLang09',
24      [exit_code(1),
25       extra_clean(['SafeLang09_A.o', 'SafeLang09_A.hi',
26                    'SafeLang09_B.o', 'SafeLang09_B.hi'])],
27      compile_and_run,
28      [''])
29 test('SafeLang10',
30      extra_clean(['SafeLang10_A.o', 'SafeLang10_A.hi',
31                   'SafeLang10_B.o', 'SafeLang10_B.hi']),
32      multimod_compile_fail,
33      ['SafeLang10', '-trust base'])
34 test('SafeLang11',
35      [req_interp,
36       extra_clean(['SafeLang11_A.o', 'SafeLang11_A.hi',
37                    'SafeLang11_B.o', 'SafeLang11_B.hi'])],
38      multimod_compile_and_run,
39      ['SafeLang11', '-trust base'])
40 test('SafeLang12', normal, multimod_compile_fail, ['SafeLang12', '-trust base'])
41 test('SafeLang13',
42      extra_clean(['SafeLang13_A.o', 'SafeLang13_A.hi']),
43      multimod_compile_and_run,
44      ['SafeLang13', '-trust base'])
45 test('SafeLang14',
46      extra_clean(['SafeLang14_A.o', 'SafeLang14_A.hi']),
47      multimod_compile_fail,
48      ['SafeLang14', '-trust base -XSafe'])
49 test('SafeLang15',
50      [exit_code(1),
51       extra_clean(['SafeLang15_A.o', 'SafeLang15_A.hi'])],
52      multimod_compile_and_run,
53      ['SafeLang15', '-trust base -XSafe'])
54 test('SafeLang16', normal, compile, [''])