comments on the failing hier test from bayley

This commit is contained in:
dons 2005-12-25 23:43:44 +00:00
parent 3db2f02a2c
commit 629c1ceb3a
2 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,5 @@
interface "unknown" Main interface "unknown" Main
module dependencies: A, B module dependencies: A, B
package dependencies: base-1.0, plugins-0.9.10 package dependencies: base-1.0, plugins-1.0
import B import B
import A import A

View File

@ -3,6 +3,13 @@ module Load where
import API import API
import System.Plugins import System.Plugins
--
-- load doesn't seem to behave nicely when using dirname on hier names
--
-- make, and maybe other places, use dirname to work out various names
-- from paths, which is invalid when hier names are used..
--
testload = do testload = do
s <- make "../Plugin1.hs" ["-i../api"] s <- make "../Plugin1.hs" ["-i../api"]
@ -10,7 +17,7 @@ testload = do
MakeSuccess _ o -> return o MakeSuccess _ o -> return o
MakeFailure e -> mapM_ putStrLn e >> fail "o1" MakeFailure e -> mapM_ putStrLn e >> fail "o1"
s <- make "../Sub/Plugin2.hs" ["-i../api"] s <- make "../Sub/Plugin2.hs" ["-i../api","-hidir.."] -- !
o2 <- case s of o2 <- case s of
MakeSuccess _ o -> return o MakeSuccess _ o -> return o
MakeFailure e -> mapM_ putStrLn e >> fail "o2" MakeFailure e -> mapM_ putStrLn e >> fail "o2"
@ -24,8 +31,9 @@ testload = do
let s = proc 42 let s = proc 42
print s print s
-- will reqeust 'Plugin2', but module is actually 'Sub.Plugin2'
print o2 print o2
fc <- pdynload o2 ["..","../api"] [] "API.PluginAPI" "action" fc <- pdynload (o2) ["..","../api"] [] "API.PluginAPI" "action"
case fc of case fc of
LoadFailure msg -> mapM_ putStrLn msg LoadFailure msg -> mapM_ putStrLn msg
LoadSuccess modul proc -> do LoadSuccess modul proc -> do