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

On branch  : master

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

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

commit c681a30a59f373fc881ec63baabca0d49590d436
Author: Ian Lynagh <[email protected]>
Date:   Sat Oct 13 16:12:57 2012 +0100

    Add a test for reloading a module in GHCi

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

 tests/ghci/scripts/all.T          |    5 +++++
 tests/ghci/scripts/ghci058.script |   14 ++++++++++++++
 tests/ghci/scripts/ghci058.stdout |    4 ++++
 3 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/tests/ghci/scripts/all.T b/tests/ghci/scripts/all.T
index 52cf9e4..880efa3 100755
--- a/tests/ghci/scripts/all.T
+++ b/tests/ghci/scripts/all.T
@@ -131,3 +131,8 @@ test('T6091', normal, ghci_script, ['T6091.script'])
 test('T6106', extra_clean(['T6106.hs']), ghci_script, ['T6106.script'])
 test('T6105', normal, ghci_script, ['T6105.script'])
 test('T7117', normal, ghci_script, ['T7117.script'])
+test('ghci058',
+     extra_clean(['Ghci058.hs', 'Ghci058.hi', 'Ghci058.o']),
+     ghci_script,
+     ['ghci058.script'])
+
diff --git a/tests/ghci/scripts/ghci058.script 
b/tests/ghci/scripts/ghci058.script
new file mode 100644
index 0000000..9999989
--- /dev/null
+++ b/tests/ghci/scripts/ghci058.script
@@ -0,0 +1,14 @@
+
+:set prompt ""
+:set -v1
+
+:! echo "module Ghci058 where c = 'a'" > Ghci058.hs
+:! "$HC" $HC_OPTS -fforce-recomp -c Ghci058.hs
+:l Ghci058
+c
+
+:! echo "module Ghci058 where c = 'b'" > Ghci058.hs
+:! "$HC" $HC_OPTS -fforce-recomp -c Ghci058.hs
+:l Ghci058
+c
+
diff --git a/tests/ghci/scripts/ghci058.stdout 
b/tests/ghci/scripts/ghci058.stdout
new file mode 100644
index 0000000..7347571
--- /dev/null
+++ b/tests/ghci/scripts/ghci058.stdout
@@ -0,0 +1,4 @@
+Ok, modules loaded: Ghci058.
+'a'
+Ok, modules loaded: Ghci058.
+'b'



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to