diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-07-25 10:53:04 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-07-25 10:53:04 -0700 |
commit | 18f4490482aa4f21a1c4e4a9493fb3a88815dcfa (patch) | |
tree | c58e6b8eac486f6b525f3e0c4a04587f34f4807a /tests | |
parent | 9c3f7688ee1c44c5452cb30986f1e37317acb6e2 (diff) | |
download | pandoc-18f4490482aa4f21a1c4e4a9493fb3a88815dcfa.tar.gz |
Fixed runtime error with compactify'DL on certain lists.
Closes #1452. Added test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Tests/Shared.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/Tests/Shared.hs b/tests/Tests/Shared.hs index 8c7c31674..c9e2e21f5 100644 --- a/tests/Tests/Shared.hs +++ b/tests/Tests/Shared.hs @@ -5,6 +5,10 @@ import Text.Pandoc.Shared import Test.Framework import Tests.Helpers import Tests.Arbitrary() +import Test.Framework.Providers.HUnit +import Test.HUnit ( assertBool ) +import Text.Pandoc.Builder +import Data.Monoid tests :: [Test] tests = [ testGroup "normalize" @@ -13,6 +17,12 @@ tests = [ testGroup "normalize" , property "p_normalize_no_trailing_spaces" p_normalize_no_trailing_spaces ] + , testGroup "compactify'DL" + [ testCase "compactify'DL with empty def" $ + assertBool "compactify'DL" + (let x = [(str "word", [para (str "def"), mempty])] + in compactify'DL x == x) + ] ] p_normalize_blocks_rt :: [Block] -> Bool |