Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dylan Yudaken
GHC
Commits
7f6a5a68
Commit
7f6a5a68
authored
Jul 14, 2011
by
Simon Marlow
Browse files
test for #5313
parent
d7b647a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/driver/5313.hs
0 → 100644
View file @
7f6a5a68
import
qualified
GHC
import
System.Environment
main
=
do
(
libdir
:
_
)
<-
getArgs
GHC
.
runGhcT
(
Just
libdir
)
$
do
-- begin initialize
df0
<-
GHC
.
getSessionDynFlags
let
df1
=
df0
{
GHC
.
ghcMode
=
GHC
.
CompManager
,
GHC
.
hscTarget
=
GHC
.
HscInterpreted
,
GHC
.
ghcLink
=
GHC
.
LinkInMemory
,
GHC
.
verbosity
=
0
}
_
<-
GHC
.
setSessionDynFlags
df1
-- begin reset
GHC
.
setContext
[]
[]
GHC
.
setTargets
[]
_
<-
GHC
.
load
GHC
.
LoadAllTargets
return
()
testsuite/tests/ghc-regress/driver/all.T
View file @
7f6a5a68
...
...
@@ -301,6 +301,14 @@ test('dynHelloWorld',
compile_and_run
,
[''])
# simple test that we can load and use the GHC package in all ways
# (in #5313 it was failing the dyn way)
p
=
subprocess
.
Popen
([
config
.
compiler
,
"
--print-libdir
"],
stdout
=
subprocess
.
PIPE
)
libdir
=
p
.
stdout
.
read
()
p
.
stdout
.
close
test
('
5313
',
extra_run_opts
(
libdir
),
compile_and_run
,
['
-package ghc
'])
test
('
2464
',
normal
,
compile
,
[''])
test
('
3674
',
ignore_output
,
run_command
,
['
$MAKE -s --no-print-directory 3674
'])
...
...
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