summaryrefslogtreecommitdiff
path: root/ghc/tests/lib
diff options
context:
space:
mode:
authorsimonmar <unknown>2001-05-21 14:08:36 +0000
committersimonmar <unknown>2001-05-21 14:08:36 +0000
commitaedf9ce5408b9a603a6fd35fc0414ce73a924ee6 (patch)
treea29fd49b4f6031be877d1e48100f0d9f4d6b4dd6 /ghc/tests/lib
parent4488f35748cdd166f6c85ef0a91eb2d7237e1c5b (diff)
downloadhaskell-aedf9ce5408b9a603a6fd35fc0414ce73a924ee6.tar.gz
[project @ 2001-05-21 14:08:36 by simonmar]
Make it a bit clearer which output goes with which test.
Diffstat (limited to 'ghc/tests/lib')
-rw-r--r--ghc/tests/lib/IO/openFile005.hs14
-rw-r--r--ghc/tests/lib/IO/openFile005.stdout7
2 files changed, 14 insertions, 7 deletions
diff --git a/ghc/tests/lib/IO/openFile005.hs b/ghc/tests/lib/IO/openFile005.hs
index fd2dfa8c41..e75e5b8c64 100644
--- a/ghc/tests/lib/IO/openFile005.hs
+++ b/ghc/tests/lib/IO/openFile005.hs
@@ -6,38 +6,38 @@ file1 = "openFile005.out1"
file2 = "openFile005.out2"
main = do
- -- two writes (should fail)
+ putStrLn "two writes (should fail)"
h <- openFile file1 WriteMode
try (openFile file1 WriteMode) >>= print
hClose h
- -- write and an append (should fail)
+ putStrLn "write and an append (should fail)"
h <- openFile file1 WriteMode
try (openFile file1 AppendMode) >>= print
hClose h
- -- read/write and a write (should fail)
+ putStrLn "read/write and a write (should fail)"
h <- openFile file1 ReadWriteMode
try (openFile file1 WriteMode) >>= print
hClose h
- -- read and a read/write (should fail)
+ putStrLn "read and a read/write (should fail)"
h <- openFile file1 ReadMode
try (openFile file1 ReadWriteMode) >>= print
hClose h
- -- write and a read (should fail)
+ putStrLn "write and a read (should fail)"
h <- openFile file1 WriteMode
try (openFile file1 ReadMode) >>= print
hClose h
- -- two writes, different files (silly, but should succeed)
+ putStrLn "two writes, different files (silly, but should succeed)"
h1 <- openFile file1 WriteMode
h2 <- openFile file2 WriteMode
hClose h1
hClose h2
- -- two reads, should succeed
+ putStrLn "two reads, should succeed"
h1 <- openFile file1 ReadMode
h2 <- openFile file1 ReadMode
hClose h1
diff --git a/ghc/tests/lib/IO/openFile005.stdout b/ghc/tests/lib/IO/openFile005.stdout
index 6899c848df..f32fff4330 100644
--- a/ghc/tests/lib/IO/openFile005.stdout
+++ b/ghc/tests/lib/IO/openFile005.stdout
@@ -1,20 +1,27 @@
+two writes (should fail)
Left resource busy
Action: openFile
Reason: file is locked
File: openFile005.out1
+write and an append (should fail)
Left resource busy
Action: openFile
Reason: file is locked
File: openFile005.out1
+read/write and a write (should fail)
Left resource busy
Action: openFile
Reason: file is locked
File: openFile005.out1
+read and a read/write (should fail)
Left resource busy
Action: openFile
Reason: file is locked
File: openFile005.out1
+write and a read (should fail)
Left resource busy
Action: openFile
Reason: file is locked
File: openFile005.out1
+two writes, different files (silly, but should succeed)
+two reads, should succeed