[commit: testsuite] master: Add regression test for #8113 (ab51c7a)

git at git.haskell.org git at git.haskell.org
Sat Aug 24 11:47:07 CEST 2013


Repository : ssh://git@git.haskell.org/testsuite

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/ab51c7a274bb77da8589e72d23518ecca6e621a4/testsuite

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

commit ab51c7a274bb77da8589e72d23518ecca6e621a4
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sat Aug 24 11:39:29 2013 +0200

    Add regression test for #8113
    
    Depends on fix in 3229eadbff857b110f20ffddb80d5f7abd5d7216 to pass


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

ab51c7a274bb77da8589e72d23518ecca6e621a4
 tests/ghci/scripts/T8113.script |   18 ++++++++++++++++++
 tests/ghci/scripts/T8113.stdout |   21 +++++++++++++++++++++
 tests/ghci/scripts/all.T        |    1 +
 3 files changed, 40 insertions(+)

diff --git a/tests/ghci/scripts/T8113.script b/tests/ghci/scripts/T8113.script
new file mode 100644
index 0000000..9392c23
--- /dev/null
+++ b/tests/ghci/scripts/T8113.script
@@ -0,0 +1,18 @@
+:def type (\e -> putStrLn ("called :type for "++show e++" (ignoring)") >> return "")
+:def
+:t ()
+:ty True
+:typ ()
+:type False
+:def! type (\e -> putStrLn ("called :type for "++show e++" (chaining)") >> return ("::type "++e))
+:def
+:t ()
+:ty True
+:typ ()
+:type False
+:undef type
+:def
+:t ()
+:ty True
+:typ ()
+:type False
diff --git a/tests/ghci/scripts/T8113.stdout b/tests/ghci/scripts/T8113.stdout
new file mode 100644
index 0000000..8260a35
--- /dev/null
+++ b/tests/ghci/scripts/T8113.stdout
@@ -0,0 +1,21 @@
+the following macros are defined:
+type
+called :type for "()" (ignoring)
+called :type for "True" (ignoring)
+called :type for "()" (ignoring)
+called :type for "False" (ignoring)
+the following macros are defined:
+type
+called :type for "()" (chaining)
+() :: ()
+called :type for "True" (chaining)
+True :: Bool
+called :type for "()" (chaining)
+() :: ()
+called :type for "False" (chaining)
+False :: Bool
+no macros defined
+() :: ()
+True :: Bool
+() :: ()
+False :: Bool
diff --git a/tests/ghci/scripts/all.T b/tests/ghci/scripts/all.T
index fe4d0fb..1577a63 100755
--- a/tests/ghci/scripts/all.T
+++ b/tests/ghci/scripts/all.T
@@ -152,3 +152,4 @@ test('T7873', normal, ghci_script, ['T7873.script'])
 test('T7939', normal, ghci_script, ['T7939.script'])
 test('T7894', normal, ghci_script, ['T7894.script'])
 test('T8116', normal, ghci_script, ['T8116.script'])
+test('T8113', normal, ghci_script, ['T8113.script'])





More information about the ghc-commits mailing list