diff options
author | Clare Macrae <github@cfmacrae.fastmail.co.uk> | 2014-07-01 22:10:08 +0100 |
---|---|---|
committer | Clare Macrae <github@cfmacrae.fastmail.co.uk> | 2014-07-01 22:10:08 +0100 |
commit | 3cb76d956028c4c529dc95aab8cc4dce93f8e886 (patch) | |
tree | 58f5d31b79db338d8646ee9d2e26fa6801193eba /tests | |
parent | 244c4eee7487e386e3e6ff7cf78146385eef9d1f (diff) | |
parent | 264e366f1a973efa56fc32079927fc51cc1936ca (diff) |
Merge branch 'master' of git://github.com/jgm/pandoc into dokuwiki
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Tests/Readers/Docx.hs | 4 | ||||
-rw-r--r-- | tests/Tests/Shared.hs | 8 | ||||
-rw-r--r-- | tests/docx.hanging_indent.docx | bin | 0 -> 29924 bytes | |||
-rw-r--r-- | tests/docx.hanging_indent.native | 3 |
4 files changed, 12 insertions, 3 deletions
diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs index 8c51217cf..a379bbf23 100644 --- a/tests/Tests/Readers/Docx.hs +++ b/tests/Tests/Readers/Docx.hs @@ -113,6 +113,10 @@ tests = [ testGroup "inlines" "docx.block_quotes.docx" "docx.block_quotes_parse_indent.native" , testCompare + "hanging indents" + "docx.hanging_indent.docx" + "docx.hanging_indent.native" + , testCompare "tables" "docx.tables.docx" "docx.tables.native" diff --git a/tests/Tests/Shared.hs b/tests/Tests/Shared.hs index f4bf13da4..8c7c31674 100644 --- a/tests/Tests/Shared.hs +++ b/tests/Tests/Shared.hs @@ -16,11 +16,13 @@ tests = [ testGroup "normalize" ] p_normalize_blocks_rt :: [Block] -> Bool -p_normalize_blocks_rt bs = normalize bs == normalize (normalize bs) +p_normalize_blocks_rt bs = + normalizeBlocks bs == normalizeBlocks (normalizeBlocks bs) p_normalize_inlines_rt :: [Inline] -> Bool -p_normalize_inlines_rt ils = normalize ils == normalize (normalize ils) +p_normalize_inlines_rt ils = + normalizeInlines ils == normalizeInlines (normalizeInlines ils) p_normalize_no_trailing_spaces :: [Inline] -> Bool p_normalize_no_trailing_spaces ils = null ils' || last ils' /= Space - where ils' = normalize $ ils ++ [Space] + where ils' = normalizeInlines $ ils ++ [Space] diff --git a/tests/docx.hanging_indent.docx b/tests/docx.hanging_indent.docx Binary files differnew file mode 100644 index 000000000..6f62dc731 --- /dev/null +++ b/tests/docx.hanging_indent.docx diff --git a/tests/docx.hanging_indent.native b/tests/docx.hanging_indent.native new file mode 100644 index 000000000..138a6967f --- /dev/null +++ b/tests/docx.hanging_indent.native @@ -0,0 +1,3 @@ +[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "hanging",Space,Str "indent,",Space,Str "with",Space,Str "the",Space,Str "left",Space,Str "side",Space,Str "set",Space,Str "to",Space,Str "the",Space,Str "left",Space,Str "margin,",Space,Str "and",Space,Str "it",Space,Str "wraps",Space,Str "around",Space,Str "the",Space,Str "line."] +,BlockQuote + [Para [Str "Five",Space,Str "years",Space,Str "have",Space,Str "passed,",Space,Str "five",Space,Str "summers",Space,Str "with",Space,Str "the",Space,Str "length"]]] |