Remove the troublesome dependency on regex-compat

Resolves #2919
This commit is contained in:
Niklas Larsson 2016-01-26 18:51:47 +01:00
parent a1b640afe7
commit 070cdf1790
2 changed files with 2 additions and 5 deletions

View File

@ -983,9 +983,6 @@ Library
, fsnotify < 2.2
, async < 2.1
-- regex-compat needed for the test/runtest.hs script, which isn't built by cabal
build-depends: regex-compat < 1.0
-- zlib >= 0.6.1 is broken with GHC < 7.10.3
if impl(ghc < 7.10.3)
build-depends: zlib < 0.6.1

View File

@ -2,6 +2,7 @@
module Main where
import Control.Monad
import Data.Char
import Data.List
import Data.Maybe
import qualified Data.Set as S
@ -13,7 +14,6 @@ import System.Exit
import System.Info
import System.IO
import System.Process
import Text.Regex
-- Because GHC earlier than 7.8 lacks setEnv
-- Install the setenv package on Windows.
@ -46,7 +46,7 @@ showDiff conf = Diff `S.member` (flags conf)
doUpdate conf = Update `S.member` (flags conf)
checkTestName :: String -> Bool
checkTestName d = (matchRegex (mkRegex "[0-9][0-9][0-9]") d /= Nothing)
checkTestName d = (all isDigit $ take 3 $ reverse d)
&& (not $ isInfixOf "disabled" d)
enumTests :: IO [String]