aboutsummaryrefslogtreecommitdiff
path: root/src/Tests/Shared.hs
blob: c35a158c1060775d7050f44965ab4e3e8695d124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Tests.Shared (tests) where

import Text.Pandoc.Definition
import Text.Pandoc.Shared
import Test.Framework
import Tests.Helpers
import Tests.Arbitrary()

tests :: [Test]
tests = [ testGroup "normalize"
          [ property "p_normalize_blocks_rt" p_normalize_blocks_rt
          , property "p_normalize_inlines_rt" p_normalize_inlines_rt
          ]
        ]

p_normalize_blocks_rt :: [Block] -> Bool
p_normalize_blocks_rt bs = normalize bs == normalize (normalize bs)

p_normalize_inlines_rt :: [Inline] -> Bool
p_normalize_inlines_rt ils = normalize ils == normalize (normalize ils)