aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-04-07 07:24:30 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-04-07 07:24:30 -0700
commitbfd598e1e93d9a15c8b69c167c5d0e5dd1503017 (patch)
treec36d3bbca4e18ccede3c5f7610781ab997ab2f1a /tests/Tests/Readers
parente352ec5a0e4af245584972e89ae13352e907cdf0 (diff)
parentc47bd8404fda0a782719848ef190b56eb0fdb9dc (diff)
downloadpandoc-bfd598e1e93d9a15c8b69c167c5d0e5dd1503017.tar.gz
Merge pull request #1224 from tarleb/org-math
Org reader: Read inline math, recognize definition lists
Diffstat (limited to 'tests/Tests/Readers')
-rw-r--r--tests/Tests/Readers/Org.hs30
1 files changed, 27 insertions, 3 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index 1088d6611..77b9d9327 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -43,8 +43,8 @@ tests =
para (strong "Cider")
, "Strong Emphasis" =:
- "/*strength*/" =?>
- para (emph . strong $ "strength")
+ "/*strength*/" =?>
+ para (emph . strong $ "strength")
, "Strikeout" =:
"+Kill Bill+" =?>
@@ -54,6 +54,10 @@ tests =
"=Robot.rock()=" =?>
para (code "Robot.rock()")
+ , "Math" =:
+ "$E=mc^2$" =?>
+ para (math "E=mc^2")
+
, "Verbatim" =:
"~word for word~" =?>
para (rawInline "" "word for word")
@@ -428,7 +432,27 @@ tests =
, "Bullet List in Ordered List" =:
("1. GNU\n" ++
" - Freedom\n") =?>
- orderedList [ (para "GNU") <> bulletList [ (plain "Freedom") ] ]
+ orderedList [ (para "GNU") <> bulletList [ (plain "Freedom") ] ]
+
+ , "Definition List" =:
+ unlines [ "- PLL :: phase-locked loop"
+ , "- TTL ::"
+ , " transistor-transistor logic"
+ , "- PSK::phase-shift keying"
+ , ""
+ , " a digital modulation scheme"
+ ] =?>
+ definitionList [ ("PLL", [ plain $ "phase-locked" <> space <> "loop" ])
+ , ("TTL", [ plain $ "transistor-transistor" <> space <>
+ "logic" ])
+ , ("PSK", [ mconcat
+ [ para $ "phase-shift" <> space <> "keying"
+ , plain $ spcSep [ "a", "digital"
+ , "modulation", "scheme" ]
+ ]
+ ]
+ )
+ ]
]
, testGroup "Tables"