(cabal check) Add "No internal name clash" test
[cabal.git] / cabal-testsuite / PackageTests / CabalMacros / setup.test.hs
blob16fdbe51277695e7e9c1158ab7d37f8706be599d
1 import Test.Cabal.Prelude
2 import qualified Data.ByteString.Char8 as BS8
4 main = setupAndCabalTest $ do
5 env <- getTestEnv
6 let mode = testRecordMode env
8 setup_build []
9 let autogenDir = testDistDir env </> "build" </> "autogen"
11 defaultRecordMode RecordAll $ recordHeader ["cabal_macros.h"]
12 contents <- liftIO $ BS8.readFile $ autogenDir </> "cabal_macros.h"
13 -- we are only interested in CURRENT_ lines
14 -- others change a lot based on available tools in the environment
15 let contents' = BS8.unlines
16 $ filter (BS8.isInfixOf $ BS8.pack "CURRENT")
17 $ BS8.lines contents
18 liftIO $ BS8.appendFile (testActualFile env) contents'