File: ProjectsSpec.hs

package info (click to toggle)
haskell-doctest-parallel 0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 648 kB
  • sloc: haskell: 3,207; ansic: 4; makefile: 3
file content (29 lines) | stat: -rw-r--r-- 695 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{-# LANGUAGE MultiWayIf #-}

module ProjectsSpec (main, spec) where

import Test.Hspec
import System.Environment (getEnvironment)
import System.Process (readCreateProcess, proc)

import qualified Data.Map as Map

main :: IO ()
main = hspec spec

spec :: Spec
spec = do
  env <- Map.fromList <$> runIO getEnvironment

  let
    -- Only test with cabal
    cDescribe =
      if
        | "STACK_EXE" `Map.member` env -> xdescribe
        | "NIX_BUILD_TOP" `Map.member` env -> xdescribe
        | otherwise -> describe

  cDescribe "T85-default-language" $ do
    it "cabal run doctests" $ do
      _ <- readCreateProcess (proc "cabal" ["run", "-v0", "--", "doctests", "--quiet"]) ""
      pure ()