diff options
author | Ian Lynagh <igloo@earth.li> | 2011-09-01 22:41:03 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-09-01 22:41:03 +0100 |
commit | 8dd8177370b34bd963a3fcab327b4ec6317d1210 (patch) | |
tree | 3a3142aff3bc6602b5eb498098372b014d3ea298 /testsuite/tests | |
parent | d45fc3676a33f67885729a1a5e1b469e2f5aa7b8 (diff) | |
download | haskell-8dd8177370b34bd963a3fcab327b4ec6317d1210.tar.gz |
Stop ghci025 sharing files with prog001
The tests could have failed if they ran in parallel
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/ghci/scripts/Ghci025B.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/Ghci025C.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/Ghci025D.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci025.script | 28 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci025.stdout | 18 |
5 files changed, 41 insertions, 24 deletions
diff --git a/testsuite/tests/ghci/scripts/Ghci025B.hs b/testsuite/tests/ghci/scripts/Ghci025B.hs new file mode 100644 index 0000000000..3218cf6541 --- /dev/null +++ b/testsuite/tests/ghci/scripts/Ghci025B.hs @@ -0,0 +1,5 @@ +module Ghci025B (module Ghci025B, module Ghci025C) where + +import Ghci025C + +k x = x `mod` 11 diff --git a/testsuite/tests/ghci/scripts/Ghci025C.hs b/testsuite/tests/ghci/scripts/Ghci025C.hs new file mode 100644 index 0000000000..9b73b6de7b --- /dev/null +++ b/testsuite/tests/ghci/scripts/Ghci025C.hs @@ -0,0 +1,9 @@ +module Ghci025C (f, g, h) where + +import Ghci025D + +g x = f x + 1 + +h x = x `div` 2 + +data C = C {x :: Int} diff --git a/testsuite/tests/ghci/scripts/Ghci025D.hs b/testsuite/tests/ghci/scripts/Ghci025D.hs new file mode 100644 index 0000000000..94a6e85292 --- /dev/null +++ b/testsuite/tests/ghci/scripts/Ghci025D.hs @@ -0,0 +1,5 @@ +module Ghci025D where + +data T = A Int | B Float deriving Eq + +f x = x + x diff --git a/testsuite/tests/ghci/scripts/ghci025.script b/testsuite/tests/ghci/scripts/ghci025.script index e4c1731c82..588e1e403d 100644 --- a/testsuite/tests/ghci/scripts/ghci025.script +++ b/testsuite/tests/ghci/scripts/ghci025.script @@ -10,18 +10,16 @@ System.IO.putStrLn ":browse! T -- with -fprint-explicit-foralls" System.IO.putStrLn "-- test :browse! <target> relative to different contexts" :set -fforce-recomp --- ToDo: this will go wrong in parallel -:! cp ../prog001/D1.hs ../prog001/D.hs -:l ../prog001/D.hs -:add ../prog001/C.hs -System.IO.putStrLn ":browse! C -- from *C>" -:browse! C -:add ../prog001/B.hs -System.IO.putStrLn ":browse! C -- from *B>, after :add B" -:browse! C -:m *C -System.IO.putStrLn ":browse! C -- from *C>, after :m *C" -:browse! C -:m *D -System.IO.putStrLn ":browse! C -- from *D>, after :m *D" -:browse! C +:l Ghci025D.hs +:add Ghci025C.hs +System.IO.putStrLn ":browse! Ghci025C -- from *Ghci025C>" +:browse! Ghci025C +:add Ghci025B.hs +System.IO.putStrLn ":browse! Ghci025C -- from *Ghci025B>, after :add Ghci025B" +:browse! Ghci025C +:m *Ghci025C +System.IO.putStrLn ":browse! Ghci025C -- from *Ghci025C>, after :m *Ghci025C" +:browse! Ghci025C +:m *Ghci025D +System.IO.putStrLn ":browse! Ghci025C -- from *Ghci025D>, after :m *Ghci025D" +:browse! Ghci025C diff --git a/testsuite/tests/ghci/scripts/ghci025.stdout b/testsuite/tests/ghci/scripts/ghci025.stdout index 2c8a9835dd..3650de21c2 100644 --- a/testsuite/tests/ghci/scripts/ghci025.stdout +++ b/testsuite/tests/ghci/scripts/ghci025.stdout @@ -86,26 +86,26 @@ c2 :: forall a b. (C a b, N b, S b) => a -> b c3 :: forall a b. C a b => forall a1. a1 -> b c4 :: forall a b. C a b => forall a1. a1 -> b -- test :browse! <target> relative to different contexts -:browse! C -- from *C> +:browse! Ghci025C -- from *Ghci025C> -- defined locally g :: forall a. Num a => a -> a h :: forall a. Integral a => a -> a --- imported via D +-- imported via Ghci025D f :: forall a. Num a => a -> a -:browse! C -- from *B>, after :add B --- imported via C +:browse! Ghci025C -- from *Ghci025B>, after :add Ghci025B +-- imported via Ghci025C g :: forall a. Num a => a -> a h :: forall a. Integral a => a -> a f :: forall a. Num a => a -> a -:browse! C -- from *C>, after :m *C +:browse! Ghci025C -- from *Ghci025C>, after :m *Ghci025C -- defined locally g :: forall a. Num a => a -> a h :: forall a. Integral a => a -> a --- imported via D +-- imported via Ghci025D f :: forall a. Num a => a -> a -:browse! C -- from *D>, after :m *D +:browse! Ghci025C -- from *Ghci025D>, after :m *Ghci025D -- not currently imported -C.g :: forall a. Num a => a -> a -C.h :: forall a. Integral a => a -> a +Ghci025C.g :: forall a. Num a => a -> a +Ghci025C.h :: forall a. Integral a => a -> a -- defined locally f :: forall a. Num a => a -> a |