summaryrefslogtreecommitdiff
path: root/tests/Tests
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-12-11 15:58:11 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-12-11 23:55:08 -0800
commit536b6bf538a95f6db6ed41b72257f8b09fd26886 (patch)
tree384dc0790f9555b16df3789c4e1a80616eadd52d /tests/Tests
parent63d875c6cbc9a8ac6b514982327a70df01d8a482 (diff)
Implemented SoftBreak and new `--wrap` option.
Added threefold wrapping option. * Command line option: deprecated `--no-wrap`, added `--wrap=[auto|none|preserve]` * Added WrapOption, exported from Text.Pandoc.Options * Changed type of writerWrapText in WriterOptions from Bool to WrapOption. * Modified Text.Pandoc.Shared functions for SoftBreak. * Supported SoftBreak in writers. * Updated tests. * Updated README. Closes #1701.
Diffstat (limited to 'tests/Tests')
-rw-r--r--tests/Tests/Readers/Markdown.hs8
-rw-r--r--tests/Tests/Writers/AsciiDoc.hs2
-rw-r--r--tests/Tests/Writers/ConTeXt.hs2
-rw-r--r--tests/Tests/Writers/Docbook.hs2
-rw-r--r--tests/Tests/Writers/HTML.hs2
5 files changed, 9 insertions, 7 deletions
diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs
index 366ab7413..0661b4642 100644
--- a/tests/Tests/Readers/Markdown.hs
+++ b/tests/Tests/Readers/Markdown.hs
@@ -157,7 +157,7 @@ tests = [ testGroup "inline code"
, "emph and strong emph alternating" =:
"*xxx* ***xxx*** xxx\n*xxx* ***xxx*** xxx"
=?> para (emph "xxx" <> space <> strong (emph "xxx") <>
- space <> "xxx" <> space <>
+ space <> "xxx" <> softbreak <>
emph "xxx" <> space <> strong (emph "xxx") <>
space <> "xxx")
, "emph with spaced strong" =:
@@ -325,7 +325,8 @@ tests = [ testGroup "inline code"
]
, "laziness" =:
"foo1\n : bar\nbaz\n : bar2\n" =?>
- definitionList [ (text "foo1", [plain (text "bar baz"),
+ definitionList [ (text "foo1", [plain (text "bar" <>
+ softbreak <> text "baz"),
plain (text "bar2")])
]
, "no blank space before first of two paragraphs" =:
@@ -347,7 +348,8 @@ tests = [ testGroup "inline code"
, testGroup "+compact_definition_lists"
[ test markdownCDL "basic compact list" $
"foo1\n: bar\n baz\nfoo2\n: bar2\n" =?>
- definitionList [ (text "foo1", [plain (text "bar baz")])
+ definitionList [ (text "foo1", [plain (text "bar" <> softbreak <>
+ text "baz")])
, (text "foo2", [plain (text "bar2")])
]
]
diff --git a/tests/Tests/Writers/AsciiDoc.hs b/tests/Tests/Writers/AsciiDoc.hs
index 56a62c6e4..1b0a8de66 100644
--- a/tests/Tests/Writers/AsciiDoc.hs
+++ b/tests/Tests/Writers/AsciiDoc.hs
@@ -7,7 +7,7 @@ import Tests.Helpers
import Tests.Arbitrary()
asciidoc :: (ToString a, ToPandoc a) => a -> String
-asciidoc = writeAsciiDoc def{ writerWrapText = False } . toPandoc
+asciidoc = writeAsciiDoc def{ writerWrapText = WrapNone } . toPandoc
tests :: [Test]
tests = [ testGroup "emphasis"
diff --git a/tests/Tests/Writers/ConTeXt.hs b/tests/Tests/Writers/ConTeXt.hs
index 8f0305adb..d44b15658 100644
--- a/tests/Tests/Writers/ConTeXt.hs
+++ b/tests/Tests/Writers/ConTeXt.hs
@@ -11,7 +11,7 @@ context :: (ToString a, ToPandoc a) => a -> String
context = writeConTeXt def . toPandoc
context' :: (ToString a, ToPandoc a) => a -> String
-context' = writeConTeXt def{ writerWrapText = False } . toPandoc
+context' = writeConTeXt def{ writerWrapText = WrapNone } . toPandoc
{-
"my test" =: X =?> Y
diff --git a/tests/Tests/Writers/Docbook.hs b/tests/Tests/Writers/Docbook.hs
index 97126b473..b1ac35980 100644
--- a/tests/Tests/Writers/Docbook.hs
+++ b/tests/Tests/Writers/Docbook.hs
@@ -8,7 +8,7 @@ import Tests.Helpers
import Tests.Arbitrary()
docbook :: (ToString a, ToPandoc a) => a -> String
-docbook = writeDocbook def{ writerWrapText = False } . toPandoc
+docbook = writeDocbook def{ writerWrapText = WrapNone } . toPandoc
{-
"my test" =: X =?> Y
diff --git a/tests/Tests/Writers/HTML.hs b/tests/Tests/Writers/HTML.hs
index 84f4db191..53ed95fc7 100644
--- a/tests/Tests/Writers/HTML.hs
+++ b/tests/Tests/Writers/HTML.hs
@@ -8,7 +8,7 @@ import Tests.Helpers
import Tests.Arbitrary()
html :: (ToString a, ToPandoc a) => a -> String
-html = writeHtmlString def{ writerWrapText = False } . toPandoc
+html = writeHtmlString def{ writerWrapText = WrapNone } . toPandoc
{-
"my test" =: X =?> Y