diff options
Diffstat (limited to 'tests/Tests/Readers')
-rw-r--r-- | tests/Tests/Readers/Docx.hs | 10 | ||||
-rw-r--r-- | tests/Tests/Readers/HTML.hs | 5 | ||||
-rw-r--r-- | tests/Tests/Readers/Org.hs | 12 |
3 files changed, 21 insertions, 6 deletions
diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs index 086d3f964..e09d56529 100644 --- a/tests/Tests/Readers/Docx.hs +++ b/tests/Tests/Readers/Docx.hs @@ -111,6 +111,10 @@ tests = [ testGroup "inlines" "docx/links.docx" "docx/links.native" , testCompare + "normalizing adjacent hyperlinks" + "docx/adjacent_links.docx" + "docx/adjacent_links.native" + , testCompare "inline image" "docx/image.docx" "docx/image_no_embed.native" @@ -165,10 +169,14 @@ tests = [ testGroup "inlines" "docx/already_auto_ident.docx" "docx/already_auto_ident.native" , testCompare - "numbered headers automatically made into list" + "single numbered item not made into list" "docx/numbered_header.docx" "docx/numbered_header.native" , testCompare + "enumerated headers not made into numbered list" + "docx/enumerated_headings.docx" + "docx/enumerated_headings.native" + , testCompare "i18n blocks (headers and blockquotes)" "docx/i18n_blocks.docx" "docx/i18n_blocks.native" diff --git a/tests/Tests/Readers/HTML.hs b/tests/Tests/Readers/HTML.hs index 2eb87a2f3..ff27b8aed 100644 --- a/tests/Tests/Readers/HTML.hs +++ b/tests/Tests/Readers/HTML.hs @@ -15,11 +15,14 @@ html = handleError . readHtml def tests :: [Test] tests = [ testGroup "base tag" [ test html "simple" $ - "<head><base href=\"http://www.w3schools.com/images\" ></head><body><img src=\"stickman.gif\" alt=\"Stickman\"></head>" =?> + "<head><base href=\"http://www.w3schools.com/images/foo\" ></head><body><img src=\"stickman.gif\" alt=\"Stickman\"></head>" =?> plain (image "http://www.w3schools.com/images/stickman.gif" "" (text "Stickman")) , test html "slash at end of base" $ "<head><base href=\"http://www.w3schools.com/images/\" ></head><body><img src=\"stickman.gif\" alt=\"Stickman\"></head>" =?> plain (image "http://www.w3schools.com/images/stickman.gif" "" (text "Stickman")) + , test html "slash at beginning of href" $ + "<head><base href=\"http://www.w3schools.com/images/\" ></head><body><img src=\"/stickman.gif\" alt=\"Stickman\"></head>" =?> + plain (image "http://www.w3schools.com/stickman.gif" "" (text "Stickman")) , test html "absolute URL" $ "<head><base href=\"http://www.w3schools.com/images/\" ></head><body><img src=\"http://example.com/stickman.gif\" alt=\"Stickman\"></head>" =?> plain (image "http://example.com/stickman.gif" "" (text "Stickman")) diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index bb3bffe22..b095ac60a 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -190,6 +190,10 @@ tests = "[[./sunset.jpg]]" =?> (para $ image "./sunset.jpg" "" "") + , "Image with explicit file: prefix" =: + "[[file:sunrise.jpg]]" =?> + (para $ image "sunrise.jpg" "" "") + , "Explicit link" =: "[[http://zeitlens.com/][pseudo-random /nonsense/]]" =?> (para $ link "http://zeitlens.com/" "" @@ -635,11 +639,11 @@ tests = ] =?> para (image "edward.jpg" "fig:goodguy" "A very courageous man.") - , "Unnamed figure" =: - unlines [ "#+caption: A great whistleblower." - , "[[snowden.png]]" + , "Figure with no name" =: + unlines [ "#+caption: I've been through the desert on this" + , "[[horse.png]]" ] =?> - para (image "snowden.png" "" "A great whistleblower.") + para (image "horse.png" "fig:" "I've been through the desert on this") , "Figure with `fig:` prefix in name" =: unlines [ "#+caption: Used as a metapher in evolutionary biology." |