update tests for safe haskell changes
authorDavid Terei <davidterei@gmail.com>
Mon, 17 Oct 2011 21:14:02 +0000 (14:14 -0700)
committerDavid Terei <davidterei@gmail.com>
Tue, 18 Oct 2011 00:04:10 +0000 (17:04 -0700)
testsuite/tests/driver/T4437.hs
testsuite/tests/safeHaskell/safeLanguage/SafeLang01.stderr
testsuite/tests/safeHaskell/safeLanguage/SafeLang02.stderr
testsuite/tests/safeHaskell/safeLanguage/SafeLang07.stderr
testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr
testsuite/tests/safeHaskell/safeLanguage/SafeLang16.hs [new file with mode: 0644]
testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stderr [new file with mode: 0644]
testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stdout [new file with mode: 0644]
testsuite/tests/safeHaskell/safeLanguage/all.T

index f237cd2..d1b12aa 100644 (file)
@@ -8,7 +8,7 @@ import Language.Haskell.Extension
 
 main :: IO ()
 main = do
-    let ghcExtensions = [ ext | (ext, _, _, _) <- xFlags ]
+    let ghcExtensions = [ ext | (ext, _, _) <- xFlags ]
         cabalExtensions = map show [ toEnum 0 :: KnownExtension .. ]
         ghcOnlyExtensions = ghcExtensions \\ cabalExtensions
         cabalOnlyExtensions = cabalExtensions \\ ghcExtensions
index 18320eb..88b5e05 100644 (file)
@@ -1,3 +1,3 @@
 
 SafeLang01.hs:1:20:
-    Warning: XTemplateHaskell is not allowed in Safe Haskell; ignoring XTemplateHaskell
+    Warning: -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell
index 6e35469..069e5be 100644 (file)
@@ -1,3 +1,3 @@
 
-<no location info>:
+SafeLang02.hs:1:20:
     Warning: -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving
index 1218b29..cb081b0 100644 (file)
@@ -1,5 +1,5 @@
 
-<no location info>:
+SafeLang07.hs:2:14:
     Warning: -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving
 
 SafeLang07.hs:15:1:
index e4f7854..03c4d1a 100644 (file)
@@ -1,9 +1,9 @@
 
 SafeLang12.hs:2:14:
-    Warning: XTemplateHaskell is not allowed in Safe Haskell; ignoring XTemplateHaskell
+    Warning: -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell
 
 SafeLang12_B.hs:2:14:
-    Warning: XTemplateHaskell is not allowed in Safe Haskell; ignoring XTemplateHaskell
+    Warning: -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell
 [1 of 3] Compiling SafeLang12_B     ( SafeLang12_B.hs, SafeLang12_B.o )
 
 SafeLang12_B.hs:14:68:
diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.hs
new file mode 100644 (file)
index 0000000..78708da
--- /dev/null
@@ -0,0 +1,11 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE Safe #-}
+
+-- | Test SafeLanguage disables things
+-- Testing ordering doesn't matter this time
+-- with Safe appearing after TH.
+module SafeLang16 where
+
+f :: Int
+f = 1
+
diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stderr
new file mode 100644 (file)
index 0000000..e15b20b
--- /dev/null
@@ -0,0 +1,3 @@
+
+SafeLang16.hs:1:14:
+    Warning: -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell
diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stdout b/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stdout
new file mode 100644 (file)
index 0000000..e69de29
index e48484f..89972e7 100644 (file)
@@ -46,3 +46,4 @@ test('SafeLang15',
       extra_clean(['SafeLang15_A.o', 'SafeLang15_A.hi'])],
      multimod_compile_and_run,
      ['SafeLang15', '-trust base -XSafe'])
+test('SafeLang16', normal, compile, [''])