pandoc/tests/Tests/Writers/Plain.hs
Artyom Kazak ec88d47f23 Correctly implement capitalisation.
Using `map toUpper` to capitalise text is wrong, as e.g.
“Straße” should be converted to “STRASSE”, which is 1 character
longer. This commit adds a `capitalize` function and replaces
2 identical implementations in different modules (`toCaps` and
`capitalize`) with it.
2014-08-03 17:37:37 +04:00

21 lines
453 B
Haskell

{-# LANGUAGE OverloadedStrings #-}
module Tests.Writers.Plain (tests) where
import Test.Framework
import Text.Pandoc.Builder
import Text.Pandoc
import Tests.Helpers
import Tests.Arbitrary()
infix 4 =:
(=:) :: (ToString a, ToPandoc a)
=> String -> (a, String) -> Test
(=:) = test (writePlain def . toPandoc)
tests :: [Test]
tests = [ "strongly emphasized text to uppercase"
=: strong "Straße"
=?> "STRASSE"
]