File: DocTests.hs

package info (click to toggle)
haskell-haskell-gi 0.21.4-3
  • links: PTS
  • area: main
  • in suites: buster
  • size: 724 kB
  • sloc: haskell: 8,498; ansic: 74; makefile: 6
file content (20 lines) | stat: -rw-r--r-- 757 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import Test.DocTest
import System.Process

main :: IO ()
main = do
  gobjectIntrospectionLibs <- pkgConfigLibs "gobject-introspection-1.0"
  doctest $ [ "-XCPP", "-XOverloadedStrings", "-XRankNTypes", "-XLambdaCase"
            , "-ilib"
            -- For the autogenerated Data.GI.CodeGen.GType (hsc)
            , "-idist-ghc/build"
            , "dist-ghc/build/lib/c/enumStorage.o"
            ] ++ gobjectIntrospectionLibs ++
            -- The actual modules to test
            [ "Data.GI.CodeGen.GtkDoc"
            , "Data.GI.CodeGen.ModulePath"
            , "Data.GI.CodeGen.SymbolNaming"
            , "Data.GI.CodeGen.Haddock" ]

pkgConfigLibs :: String -> IO [String]
pkgConfigLibs pkg = words <$> readProcess "pkg-config" ["--libs", pkg] ""