Add tests on header to anchor conversion

This commit is contained in:
martoon 2019-03-11 17:16:06 +03:00
parent dc14c19e45
commit 2f4101c361
No known key found for this signature in database
GPG Key ID: FF02288E36C0E4B0
4 changed files with 29 additions and 0 deletions

View File

@ -90,3 +90,12 @@ executables:
- -O2
dependencies:
- crossref-verifier
tests:
crossref-verifier-tests:
main: Main.hs
source-dirs: tests
dependencies:
- crossref-verifier
- hspec
- QuickCheck

5
tests/Main.hs Normal file
View File

@ -0,0 +1,5 @@
import Spec (spec)
import Test.Hspec (hspec)
main :: IO ()
main = hspec spec

1
tests/Spec.hs Normal file
View File

@ -0,0 +1 @@
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-}

View File

@ -0,0 +1,14 @@
module Test.Crv.AnchorsSpec where
import Test.Hspec (Spec, it)
import Test.QuickCheck (conjoin, (===))
import Crv.Core (headerToAnchor)
spec :: Spec
spec = do
it "Header-to-anchor conversion" $
conjoin $ map (\(a, b) -> headerToAnchor a === b) $
[
]