Commit 8dd9929a authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

testsuite: Add (broken) test for #17510

parent 7a823b0f
Pipeline #13647 canceled with stages
-- | Test that a handle from 'hDuplicate' really shares the file position with
-- its parent.
import System.IO
import GHC.IO.Handle
main :: IO ()
main = do
writeFile "test" "hello\nworld\ntesting\n"
h <- openFile "test" ReadMode
h2 <- hDuplicate h
hGetLine h >>= putStrLn -- should print "hello"
hGetLine h2 >>= putStrLn -- should print "world"
hGetLine h >>= putStrLn -- should print "testing"
......@@ -142,3 +142,4 @@ test('T17414',
when(opsys('linux'), skip),
compile_and_run, [''])
test('T17510', expect_broken(17510), compile_and_run, [''])
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment