From aedf9ce5408b9a603a6fd35fc0414ce73a924ee6 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 21 May 2001 14:08:36 +0000 Subject: [PATCH] [project @ 2001-05-21 14:08:36 by simonmar] Make it a bit clearer which output goes with which test. --- ghc/tests/lib/IO/openFile005.hs | 14 +++++++------- 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 fd2dfa8..e75e5b8 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 6899c84..f32fff4 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 -- 1.7.10.4