Commit c41b9a84 authored by dterei's avatar dterei
Browse files

Add test for 'distrust-all-packages' flag

parent 96368983
{-# LANGUAGE Safe #-}
module Check09 where
import Data.ByteString.Char8
b :: ByteString
b = pack "Hello World"
Check09.hs:4:1:
bytestring-0.9.2.0:Data.ByteString.Char8 can't be safely imported! The package (bytestring-0.9.2.0) the module resides in isn't trusted.
{-# LANGUAGE Safe #-}
module Check10 where
import Data.ByteString.Char8
b :: ByteString
b = pack "Hello World"
......@@ -57,3 +57,10 @@ test('Check08',
extra_clean(['Check08_A.hi', 'Check08_A.o', 'Check08_B.hi', 'Check08_B.o']),
multimod_compile_fail, ['Check08', ''])
# check -distrust-all-packages flag works
test('Check09', normal, compile_fail, ['-fpackage-trust -distrust-all-packages'])
# as above but trust this time
test('Check10', normal, compile,
['-fpackage-trust -distrust-all-packages -trust bytestring -trust base'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment