aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-09-27 16:18:55 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-09-27 16:18:55 -0700
commit5bab9574f615ef41bc0ae85c161e2a88a55bd86c (patch)
tree666e1d2612d38f87ba0f6193e3d48b432a9f999b /tests/Tests/Readers
parent7b01edce056394c19efc92a3db46562982b5c36c (diff)
parentfa2d11c9548dbbfb7354be29ceb894cc5d3ccdbf (diff)
downloadpandoc-5bab9574f615ef41bc0ae85c161e2a88a55bd86c.tar.gz
Merge pull request #1644 from mpickering/master
Fixes and Enhancements from the tracker
Diffstat (limited to 'tests/Tests/Readers')
-rw-r--r--tests/Tests/Readers/EPUB.hs5
-rw-r--r--tests/Tests/Readers/Org.hs4
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/Tests/Readers/EPUB.hs b/tests/Tests/Readers/EPUB.hs
index f27ea979f..0d19a8400 100644
--- a/tests/Tests/Readers/EPUB.hs
+++ b/tests/Tests/Readers/EPUB.hs
@@ -8,6 +8,7 @@ import qualified Data.ByteString.Lazy as BL
import Text.Pandoc.Readers.EPUB
import Text.Pandoc.MediaBag (MediaBag, mediaDirectory)
import Control.Applicative
+import System.FilePath (joinPath)
getMediaBag :: FilePath -> IO MediaBag
getMediaBag fp = snd . readEPUB def <$> BL.readFile fp
@@ -22,12 +23,12 @@ testMediaBag fp bag = do
(actBag == bag)
featuresBag :: [(String, String, Int)]
-featuresBag = [("img/ElementaryMathExample.png","image/png",1331),("img/Maghreb1.png","image/png",2520),("img/check.gif","image/gif",1340),("img/check.jpg","image/jpeg",2661),("img/check.png","image/png",2815),("img/cichons_diagram.png","image/png",7045),("img/complex_number.png","image/png",5238),("img/multiscripts_and_greek_alphabet.png","image/png",10060)]
+featuresBag = [(joinPath ["img","check.gif"],"image/gif",1340),(joinPath ["img","check.jpg"],"image/jpeg",2661),(joinPath ["img","check.png"],"image/png",2815),(joinPath ["img","multiscripts_and_greek_alphabet.png"],"image/png",10060)]
tests :: [Test]
tests =
[ testGroup "EPUB Mediabag"
[ testCase "features bag"
- (testMediaBag "epub/features.epub" featuresBag)
+ (testMediaBag "epub/img.epub" featuresBag)
]
]
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index b9896e1b0..92ec8155b 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -702,7 +702,9 @@ tests =
]
])
]
-
+ , "Definition list with multi-word term" =:
+ " - Elijah Wood :: He plays Frodo" =?>
+ definitionList [ ("Elijah" <> space <> "Wood", [plain $ "He" <> space <> "plays" <> space <> "Frodo"])]
, "Compact definition list" =:
unlines [ "- ATP :: adenosine 5' triphosphate"
, "- DNA :: deoxyribonucleic acid"