Permalink
Browse files

Add test for ambiguous rules

  • Loading branch information...
1 parent a975984 commit ad874202494af5ed74ec7ca92fb2548404253e0d @batterseapower committed Mar 5, 2011
Showing with 20 additions and 0 deletions.
  1. +7 −0 tests/Test.lhs
  2. +13 −0 tests/ambiguous-rules/Shakefile.hs
View
@@ -123,6 +123,13 @@ main :: IO ()
main = do
mtimeSanityCheck
+ withTest "ambiguous-rules" ["foo"] $ do
+ ec <- shake_ "Shakefile.hs" []
+ ExitSuccess `assertEqualM` ec
+
+ x <- readFile "foo"
+ "First rule" `assertEqualM` x
+
withTest "lexical-scope" ["examplefile"] $ do
ec <- shake_ "Shakefile.hs" []
ExitSuccess `assertEqualM` ec
@@ -0,0 +1,13 @@
+import Development.Shake
+import Development.Shake.System
+
+import System.FilePath
+
+
+main :: IO ()
+main = shake $ do
+ "foo" *> \x -> do
+ writeFile x "First rule"
+ "foo" *> \x -> do
+ writeFile x "Second rule"
+ want ["foo"]

0 comments on commit ad87420

Please sign in to comment.