Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tobias Decking
GHC
Commits
2919d9a8
Commit
2919d9a8
authored
Dec 01, 2010
by
Simon Marlow
Browse files
add test for
#4808
parent
014c745d
Changes
4
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/lib/IO/4808.hs
0 → 100644
View file @
2919d9a8
import
System.IO
import
GHC.IO.Handle
import
GHC.IO.FD
as
FD
main
=
do
(
fd
,
_
)
<-
FD
.
openFile
"4808.hs"
ReadWriteMode
hdl
<-
mkDuplexHandle
fd
"4808.hs"
Nothing
nativeNewlineMode
hClose
hdl
(
fd2
,
_
)
<-
FD
.
openFile
"4808.hs"
ReadWriteMode
print
(
fdFD
fd
==
fdFD
fd2
)
-- should be True
hGetLine
hdl
>>=
print
-- should fail with an exception
testsuite/tests/ghc-regress/lib/IO/4808.stderr
0 → 100644
View file @
2919d9a8
4808: 4808.hs: hGetLine: illegal operation (handle is closed)
testsuite/tests/ghc-regress/lib/IO/4808.stdout
0 → 100644
View file @
2919d9a8
True
testsuite/tests/ghc-regress/lib/IO/all.T
View file @
2919d9a8
...
...
@@ -158,3 +158,5 @@ test('T4113', normal, compile_and_run, [''])
test
('
T4144
',
normal
,
compile_and_run
,
[''])
test
('
encodingerror001
',
normal
,
compile_and_run
,
[''])
test
('
4808
',
exit_code
(
1
),
compile_and_run
,
[''])
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment