Update examples
This commit is contained in:
3
testsuite/make/remake001/Bar.hs
Normal file
3
testsuite/make/remake001/Bar.hs
Normal file
@ -0,0 +1,3 @@
|
||||
module Bar where
|
||||
|
||||
bar = undefined
|
3
testsuite/make/remake001/Foo.hs
Normal file
3
testsuite/make/remake001/Foo.hs
Normal file
@ -0,0 +1,3 @@
|
||||
module Foo where
|
||||
|
||||
foo = undefined
|
36
testsuite/make/remake001/Main.hs
Normal file
36
testsuite/make/remake001/Main.hs
Normal file
@ -0,0 +1,36 @@
|
||||
--
|
||||
-- expected output:
|
||||
-- $ ./a.out
|
||||
-- True
|
||||
-- False
|
||||
-- True
|
||||
-- False
|
||||
--
|
||||
|
||||
import System.Plugins
|
||||
import System.Directory
|
||||
|
||||
main = do
|
||||
status <- make "Foo.hs" [] -- should make
|
||||
print status
|
||||
|
||||
status <- make "Foo.hs" [] -- shouldn't make
|
||||
print status
|
||||
|
||||
status <- merge "Foo.hs" "Bar.hs"
|
||||
case status of
|
||||
MergeFailure e -> error $ show e
|
||||
MergeSuccess _ _ fp -> do {
|
||||
|
||||
;status <- make fp [] -- should make
|
||||
;() <- case status of
|
||||
MakeSuccess c _ -> print c
|
||||
MakeFailure e -> error $ show e
|
||||
|
||||
;status <- make fp [] -- shouldn't make
|
||||
;case status of
|
||||
MakeSuccess c _ -> print c
|
||||
MakeFailure e -> error $ show e
|
||||
;removeFile "Foo.o"
|
||||
}
|
||||
|
4
testsuite/make/remake001/Makefile
Normal file
4
testsuite/make/remake001/Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
TEST= merge/remake001
|
||||
|
||||
TOP=../../..
|
||||
include ../../eval.mk
|
4
testsuite/make/remake001/expected
Normal file
4
testsuite/make/remake001/expected
Normal file
@ -0,0 +1,4 @@
|
||||
MakeSuccess ReComp "Foo.o"
|
||||
MakeSuccess NotReq "Foo.o"
|
||||
ReComp
|
||||
NotReq
|
Reference in New Issue
Block a user