diff options
Diffstat (limited to 'ghc')
| -rw-r--r-- | ghc/tests/lib/IO/openFile005.hs | 14 | ||||
| -rw-r--r-- | ghc/tests/lib/IO/openFile005.stdout | 7 |
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 |
