Add test for #7172.
authorDavid Terei <davidterei@gmail.com>
Thu, 23 Aug 2012 09:01:03 +0000 (02:01 -0700)
committerDavid Terei <davidterei@gmail.com>
Thu, 23 Aug 2012 09:01:03 +0000 (02:01 -0700)
testsuite/tests/safeHaskell/ghci/all.T
testsuite/tests/safeHaskell/ghci/p18.script [new file with mode: 0644]
testsuite/tests/safeHaskell/ghci/p18.stderr [new file with mode: 0644]
testsuite/tests/safeHaskell/ghci/p18.stdout [new file with mode: 0644]

index 1c878c6..937dcd8 100644 (file)
@@ -17,4 +17,6 @@ test('p14', normal, ghci_script, ['p14.script'])
 test('p15', normal, ghci_script, ['p15.script'])
 test('p16', normal, ghci_script, ['p16.script'])
 test('p17', normal, ghci_script, ['p17.script'])
+# 7172
+test('p18', normal, ghci_script, ['p18.script'])
 
diff --git a/testsuite/tests/safeHaskell/ghci/p18.script b/testsuite/tests/safeHaskell/ghci/p18.script
new file mode 100644 (file)
index 0000000..445dffa
--- /dev/null
@@ -0,0 +1,10 @@
+-- Test :issafe works
+:unset +s
+
+-- first without package trust
+:issafe Data.ByteString
+
+-- now with package trust
+:set -fpackage-trust
+:issafe Data.ByteString
+
diff --git a/testsuite/tests/safeHaskell/ghci/p18.stderr b/testsuite/tests/safeHaskell/ghci/p18.stderr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/testsuite/tests/safeHaskell/ghci/p18.stdout b/testsuite/tests/safeHaskell/ghci/p18.stdout
new file mode 100644 (file)
index 0000000..adc5c8a
--- /dev/null
@@ -0,0 +1,7 @@
+Trust type is (Module: Trustworthy, Package: untrusted)
+Package Trust: Off
+Data.ByteString is trusted!
+Trust type is (Module: Trustworthy, Package: untrusted)
+Package Trust: On
+Trusted package dependencies (untrusted): bytestring-0.10.0.0
+Data.ByteString is NOT trusted!