File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,17 @@ t633 =
202202 _ <- evaluate (stimes (maxBound :: Word ) " a" :: T. Text )
203203 assertFailure " should fail"
204204
205+ t648 :: IO ()
206+ t648 = withTempFile $ \ _ h -> do
207+ hSetEncoding h utf8
208+ hSetNewlineMode h (NewlineMode LF CRLF )
209+ hSetBuffering h (BlockBuffering $ Just 4 )
210+ let line = T. replicate 2047 " _"
211+ T. hPutStrLn h line
212+ hSeek h AbsoluteSeek 0
213+ line' <- T. hGetLine h
214+ T. append line " \r " @?= line'
215+
205216tests :: F. TestTree
206217tests = F. testGroup " Regressions"
207218 [ F. testCase " hGetContents_crash" hGetContents_crash
@@ -221,4 +232,5 @@ tests = F.testGroup "Regressions"
221232 , F. testCase " t529" t529
222233 , F. testCase " t559" t559
223234 , F. testCase " t633" t633
235+ , F. testCase " t648" t648
224236 ]
You can’t perform that action at this time.
0 commit comments