mirror of
https://github.com/serokell/xrefcheck.git
synced 2024-08-16 17:10:26 +03:00
Add tests on header to anchor conversion
This commit is contained in:
parent
dc14c19e45
commit
2f4101c361
@ -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
5
tests/Main.hs
Normal file
@ -0,0 +1,5 @@
|
||||
import Spec (spec)
|
||||
import Test.Hspec (hspec)
|
||||
|
||||
main :: IO ()
|
||||
main = hspec spec
|
1
tests/Spec.hs
Normal file
1
tests/Spec.hs
Normal file
@ -0,0 +1 @@
|
||||
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-}
|
14
tests/Test/Crv/AnchorsSpec.hs
Normal file
14
tests/Test/Crv/AnchorsSpec.hs
Normal 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) $
|
||||
[
|
||||
|
||||
]
|
Loading…
Reference in New Issue
Block a user