aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Tests')
-rw-r--r--tests/Tests/Old.hs3
-rw-r--r--tests/Tests/Readers/Org.hs35
2 files changed, 33 insertions, 5 deletions
diff --git a/tests/Tests/Old.hs b/tests/Tests/Old.hs
index b292b1f11..4e0eb46a4 100644
--- a/tests/Tests/Old.hs
+++ b/tests/Tests/Old.hs
@@ -108,6 +108,9 @@ tests = [ testGroup "markdown"
, test "reader" ["-r", "docbook", "-w", "native", "-s"]
"docbook-xref.docbook" "docbook-xref.native"
]
+ , testGroup "docbook5"
+ [ testGroup "writer" $ writerTests "docbook5"
+ ]
, testGroup "native"
[ testGroup "writer" $ writerTests "native"
, test "reader" ["-r", "native", "-w", "native", "-s"]
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index bb9b37d13..fa0c57f71 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -308,6 +308,10 @@ tests =
"\\textit{Emphasised}" =?>
para (emph "Emphasised")
+ , "Inline LaTeX command with spaces" =:
+ "\\emph{Emphasis mine}" =?>
+ para (emph "Emphasis mine")
+
, "Inline LaTeX math symbol" =:
"\\tau" =?>
para (emph "τ")
@@ -328,6 +332,10 @@ tests =
"\\copy" =?>
para "©"
+ , "MathML symbols, space separated" =:
+ "\\ForAll \\Auml" =?>
+ para "∀ Ä"
+
, "LaTeX citation" =:
"\\cite{Coffee}" =?>
let citation = Citation
@@ -461,6 +469,12 @@ tests =
, "[[expl:foo][bar]]"
] =?>
(para (link "http://example.com/foo" "" "bar"))
+
+ , "Export option: Disable simple sub/superscript syntax" =:
+ unlines [ "#+OPTIONS: ^:nil"
+ , "a^b"
+ ] =?>
+ para "a^b"
]
, testGroup "Basic Blocks" $
@@ -941,7 +955,7 @@ tests =
, "Empty table" =:
"||" =?>
- simpleTable' 1 mempty mempty
+ simpleTable' 1 mempty [[mempty]]
, "Glider Table" =:
unlines [ "| 1 | 0 | 0 |"
@@ -996,6 +1010,17 @@ tests =
, [ plain "dynamic", plain "Lisp" ]
]
+ , "Table with empty cells" =:
+ "|||c|" =?>
+ simpleTable' 3 mempty [[mempty, mempty, plain "c"]]
+
+ , "Table with empty rows" =:
+ unlines [ "| first |"
+ , "| |"
+ , "| third |"
+ ] =?>
+ simpleTable' 1 mempty [[plain "first"], [mempty], [plain "third"]]
+
, "Table with alignment row" =:
unlines [ "| Numbers | Text | More |"
, "| <c> | <r> | |"
@@ -1024,10 +1049,10 @@ tests =
, "| 1 | One | foo |"
, "| 2"
] =?>
- table "" (zip [AlignCenter, AlignRight, AlignDefault] [0, 0, 0])
- [ plain "Numbers", plain "Text" , plain mempty ]
- [ [ plain "1" , plain "One" , plain "foo" ]
- , [ plain "2" , plain mempty , plain mempty ]
+ table "" (zip [AlignCenter, AlignRight] [0, 0])
+ [ plain "Numbers", plain "Text" ]
+ [ [ plain "1" , plain "One" , plain "foo" ]
+ , [ plain "2" ]
]
, "Table with caption" =: