Update examples
This commit is contained in:
15
testsuite/load/io/prog/Main.hs
Normal file
15
testsuite/load/io/prog/Main.hs
Normal file
@ -0,0 +1,15 @@
|
||||
{-# OPTIONS -cpp #-}
|
||||
|
||||
#include "../../../../config.h"
|
||||
|
||||
import System.Plugins
|
||||
import API
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
m_v <- load "../TestIO.o" ["../api"] [] "resource"
|
||||
v <- case m_v of
|
||||
LoadFailure _ -> error "load failed"
|
||||
LoadSuccess _ v -> return v
|
||||
s <- field v
|
||||
if null s then print False else print True
|
1
testsuite/load/io/prog/expected
Normal file
1
testsuite/load/io/prog/expected
Normal file
@ -0,0 +1 @@
|
||||
True
|
Reference in New Issue
Block a user