1 import Test
.Cabal
.Prelude
2 import qualified Data
.ByteString
.Char8
as BS8
4 main
= setupAndCabalTest
$ do
6 let mode
= testRecordMode env
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")
18 liftIO
$ BS8
.appendFile (testActualFile env
) contents
'