1 import Test
.Cabal
.Prelude
4 main
= setupTest
. recordMode DoNotRecord
. withPackageDb
$ do
5 -- This test exposes a recompilation bug in ghc versions 9.0.2 and 9.2.8
6 skipIfGhcVersion
"== 9.0.2 || == 9.2.8 || < 8.0 "
7 setup_install
["-fgenerate"]
8 r1
<- runInstalledExe
' "autogen-toggle-test" []
9 setup_install
["-f-generate"]
10 r2
<- runInstalledExe
' "autogen-toggle-test" []
11 assertOutputContains
"Real module, ship to production" r1
12 assertOutputContains
"Prebuilt module, don't use in production" r2