Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
process
Commits
06bb9851
Commit
06bb9851
authored
Jun 02, 2013
by
ian@well-typed.com
Browse files
Add a test for better exceptions when ewxecuting programs
parent
df810a59
Changes
3
Hide whitespace changes
Inline
Side-by-side
tests/all.T
View file @
06bb9851
...
...
@@ -32,3 +32,4 @@ test('T3994', only_ways(['threaded1','threaded2']), compile_and_run, [''])
test
('
T4889
',
normal
,
compile_and_run
,
[''])
test
('
process009
',
when
(
opsys
('
mingw32
'),
skip
),
compile_and_run
,
[''])
test
('
process010
',
normal
,
compile_and_run
,
[''])
tests/process010.hs
0 → 100644
View file @
06bb9851
import
System.IO.Error
import
System.Process
main
::
IO
()
main
=
do
run
"/bin/true"
run
"/bin/false"
run
"/non/existent"
putStrLn
"Done"
run
::
FilePath
->
IO
()
run
fp
=
(
rawSystem
fp
[]
>>=
print
)
`
catchIOError
`
\
e
->
putStrLn
(
"Exc: "
++
show
e
)
tests/process010.stdout
0 → 100644
View file @
06bb9851
ExitSuccess
ExitFailure 1
Exc: /non/existent: rawSystem: runInteractiveProcess: exec: does not exist (No such file or directory)
Done
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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