[commit: testsuite] master: Add a couple of tests for #7627 (d92f4c7)

Ian Lynagh igloo at earth.li
Mon Feb 25 23:27:04 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d92f4c76f6ba5a817786f91bc663c656b101def4

>---------------------------------------------------------------

commit d92f4c76f6ba5a817786f91bc663c656b101def4
Author: Ian Lynagh <ian at well-typed.com>
Date:   Mon Feb 25 21:39:59 2013 +0000

    Add a couple of tests for #7627

>---------------------------------------------------------------

 tests/ghci/scripts/T7627.script                    |   16 ++++++++++++++++
 .../ghci/scripts/{ghci011.stdout => T7627.stdout}  |   17 ++++++++++-------
 tests/ghci/scripts/T7627b.script                   |    8 ++++++++
 tests/ghci/scripts/T7627b.stderr                   |   12 ++++++++++++
 tests/ghci/scripts/all.T                           |    2 ++
 5 files changed, 48 insertions(+), 7 deletions(-)

diff --git a/tests/ghci/scripts/T7627.script b/tests/ghci/scripts/T7627.script
new file mode 100644
index 0000000..13f52a5
--- /dev/null
+++ b/tests/ghci/scripts/T7627.script
@@ -0,0 +1,16 @@
+
+:set -XUnboxedTuples
+
+:i ()
+:i (##)
+:t ()
+:t (##)
+:t (   )
+:t (#   #)
+:i (,)
+:i (#,#)
+:t (,)
+:t (#,#)
+:t (  ,  )
+:t (#  ,  #)
+
diff --git a/tests/ghci/scripts/ghci011.stdout b/tests/ghci/scripts/T7627.stdout
similarity index 67%
copy from tests/ghci/scripts/ghci011.stdout
copy to tests/ghci/scripts/T7627.stdout
index 540572e..a23781a 100644
--- a/tests/ghci/scripts/ghci011.stdout
+++ b/tests/ghci/scripts/T7627.stdout
@@ -1,10 +1,3 @@
-data [] a = [] | a : [a] 	-- Defined in ‛GHC.Types’
-instance Eq a => Eq [a] -- Defined in ‛GHC.Classes’
-instance Monad [] -- Defined in ‛GHC.Base’
-instance Functor [] -- Defined in ‛GHC.Base’
-instance Ord a => Ord [a] -- Defined in ‛GHC.Classes’
-instance Read a => Read [a] -- Defined in ‛GHC.Read’
-instance Show a => Show [a] -- Defined in ‛GHC.Show’
 data () = () 	-- Defined in ‛GHC.Tuple’
 instance Bounded () -- Defined in ‛GHC.Enum’
 instance Enum () -- Defined in ‛GHC.Enum’
@@ -12,6 +5,11 @@ instance Eq () -- Defined in ‛GHC.Classes’
 instance Ord () -- Defined in ‛GHC.Classes’
 instance Read () -- Defined in ‛GHC.Read’
 instance Show () -- Defined in ‛GHC.Show’
+data (##) = (##) 	-- Defined in ‛GHC.Prim’
+() :: ()
+(##) :: (# #)
+(   ) :: ()
+(#   #) :: (# #)
 data (,) a b = (,) a b 	-- Defined in ‛GHC.Tuple’
 instance (Bounded a, Bounded b) => Bounded (a, b)
   -- Defined in ‛GHC.Enum’
@@ -20,3 +18,8 @@ instance Functor ((,) a) -- Defined in ‛GHC.Base’
 instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‛GHC.Classes’
 instance (Read a, Read b) => Read (a, b) -- Defined in ‛GHC.Read’
 instance (Show a, Show b) => Show (a, b) -- Defined in ‛GHC.Show’
+data (#,#) a b = (#,#) a b 	-- Defined in ‛GHC.Prim’
+(,) :: a -> b -> (a, b)
+(#,#) :: a -> b -> (# a, b #)
+(  ,  ) :: a -> b -> (a, b)
+(#  ,  #) :: a -> b -> (# a, b #)
diff --git a/tests/ghci/scripts/T7627b.script b/tests/ghci/scripts/T7627b.script
new file mode 100644
index 0000000..9c0a404
--- /dev/null
+++ b/tests/ghci/scripts/T7627b.script
@@ -0,0 +1,8 @@
+
+:set -XUnboxedTuples
+
+:i (   )
+:i (#   #)
+:i (  ,  )
+:i (#  ,  #)
+
diff --git a/tests/ghci/scripts/T7627b.stderr b/tests/ghci/scripts/T7627b.stderr
new file mode 100644
index 0000000..87997e7
--- /dev/null
+++ b/tests/ghci/scripts/T7627b.stderr
@@ -0,0 +1,12 @@
+
+<interactive>:1:2:
+    parse error (possibly incorrect indentation or mismatched brackets)
+
+<interactive>:1:3:
+    parse error (possibly incorrect indentation or mismatched brackets)
+
+<interactive>:1:2:
+    parse error (possibly incorrect indentation or mismatched brackets)
+
+<interactive>:1:3:
+    parse error (possibly incorrect indentation or mismatched brackets)
diff --git a/tests/ghci/scripts/all.T b/tests/ghci/scripts/all.T
index e02a978..7af3bf9 100755
--- a/tests/ghci/scripts/all.T
+++ b/tests/ghci/scripts/all.T
@@ -142,4 +142,6 @@ test('ghci058',
      ['ghci058.script'])
 test('T7587', normal, ghci_script, ['T7587.script'])
 test('T7688', normal, ghci_script, ['T7688.script'])
+test('T7627', normal, ghci_script, ['T7627.script'])
+test('T7627b', normal, ghci_script, ['T7627b.script'])
 





More information about the ghc-commits mailing list