File tree Expand file tree Collapse file tree
cabal-testsuite/PackageTests/SetupHooks/SetupHooksRecursiveGlob Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import Test.Cabal.Prelude
2-
3- import Control.Monad.Catch (finally )
4-
51main =
62 setupTest $ do
7- runSetupTest `finally` cleanup
8- where
9- runSetupTest = do
10- setup " configure" []
11- setup " build" []
12- -- Now modify one file and build again to see if that exact file gets rebuilt
13- env <- getTestEnv
14- liftIO $ do
15- let srcDir = testSourceDir env
16- writeFile (srcDir </> " src/Foo/B.ppExt" ) " module Foo.B where\n Modified text"
17- setup " build" []
18- cleanup = do
19- env <- getTestEnv
20- let srcDir = testSourceDir env
21- liftIO $ writeFile (srcDir </> " src/Foo/B.ppExt" ) " module Foo.B where\n Original text\n "
3+ setup " configure" []
4+ setup " build" []
5+ -- Modify one file in the temp copy (testCurrentDir) and rebuild; only
6+ -- the preprocessor rule for Foo.B should re-run, not the one for A.
7+ writeSourceFile " src/Foo/B.ppExt" " module Foo.B where\n Modified text"
8+ setup " build" []
You can’t perform that action at this time.
0 commit comments