diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Readers/Muse.hs | 43 | ||||
-rw-r--r-- | test/Tests/Readers/RST.hs | 13 | ||||
-rw-r--r-- | test/command/3497.md | 2 | ||||
-rw-r--r-- | test/command/3771.md | 14 | ||||
-rw-r--r-- | test/command/3880.md | 6 | ||||
-rw-r--r-- | test/command/3880.txt | 1 | ||||
-rw-r--r-- | test/writers-lang-and-dir.latex | 12 |
7 files changed, 79 insertions, 12 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 1f3218daf..dac167a92 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -145,6 +145,38 @@ tests = , " with a continuation" ] =?> blockQuote (para "This is a quotation with a continuation") + , testGroup "Div" + [ "Div without id" =: + "<div>Foo bar</div>" =?> + divWith nullAttr (para "Foo bar") + , "Div with id" =: + "<div id=\"foo\">Foo bar</div>" =?> + divWith ("foo", [], []) (para "Foo bar") + ] + , "Verse" =: + T.unlines [ "> This is" + , "> First stanza" + , ">" -- Emacs produces verbatim ">" here, we follow Amusewiki + , "> And this is" + , "> Second stanza" + , ">" + , "" + , ">" + , "" + , "> Another verse" + , "> is here" + ] =?> + lineBlock [ "This is" + , "First stanza" + , "" + , "And this is" + , "\160\160Second stanza" + , "" + ] <> + lineBlock [ "" ] <> + lineBlock [ "Another verse" + , "\160\160\160is here" + ] ] , "Quote tag" =: "<quote>Hello, world</quote>" =?> blockQuote (para $ text "Hello, world") , "Verse tag" =: @@ -178,20 +210,21 @@ tests = ] , testGroup "Headers" [ "Part" =: - "* First level\n" =?> + "* First level" =?> header 1 "First level" , "Chapter" =: - "** Second level\n" =?> + "** Second level" =?> header 2 "Second level" , "Section" =: - "*** Third level\n" =?> + "*** Third level" =?> header 3 "Third level" , "Subsection" =: - "**** Fourth level\n" =?> + "**** Fourth level" =?> header 4 "Fourth level" , "Subsubsection" =: - "***** Fifth level\n" =?> + "***** Fifth level" =?> header 5 "Fifth level" + , "Whitespace is required after *" =: "**Not a header" =?> para "**Not a header" , "No headers in footnotes" =: T.unlines [ "Foo[1]" , "[1] * Bar" diff --git a/test/Tests/Readers/RST.hs b/test/Tests/Readers/RST.hs index 61a2673f5..928fc1a99 100644 --- a/test/Tests/Readers/RST.hs +++ b/test/Tests/Readers/RST.hs @@ -136,6 +136,19 @@ tests = [ "line block with blank line" =: para "but must stop here") , "line block with 3 lines" =: "| a\n| b\n| c" =?> lineBlock ["a", "b", "c"] + , "line blocks with blank lines" =: T.unlines + [ "|" + , "" + , "|" + , "| a" + , "| b" + , "|" + , "" + , "|" + ] =?> + lineBlock [""] <> + lineBlock ["", "a", "b", ""] <> + lineBlock [""] , "quoted literal block using >" =: "::\n\n> quoted\n> block\n\nOrdinary paragraph" =?> codeBlock "> quoted\n> block" <> para "Ordinary paragraph" , "quoted literal block using | (not a line block)" =: "::\n\n| quoted\n| block\n\nOrdinary paragraph" diff --git a/test/command/3497.md b/test/command/3497.md index 326817b0d..ca591cdd6 100644 --- a/test/command/3497.md +++ b/test/command/3497.md @@ -46,6 +46,6 @@ Also escape things that might become line blocks or tables: % pandoc -t markdown \| hi \| ^D -\| hi | +\| hi \| ``` diff --git a/test/command/3771.md b/test/command/3771.md new file mode 100644 index 000000000..1d3a75ae1 --- /dev/null +++ b/test/command/3771.md @@ -0,0 +1,14 @@ +``` +% pandoc -f html -t org +<div class="Section1"> + Today is a nice day. +</div> +<div id="forecast"> + Tomorrow will be rainy. +</div> +^D +Today is a nice day. + +<<forecast>> +Tomorrow will be rainy. +``` diff --git a/test/command/3880.md b/test/command/3880.md new file mode 100644 index 000000000..b8edaf08f --- /dev/null +++ b/test/command/3880.md @@ -0,0 +1,6 @@ +``` +pandoc -f rst -t native +.. include:: command/3880.txt +^D +[Para [Str "hi"]] +``` diff --git a/test/command/3880.txt b/test/command/3880.txt new file mode 100644 index 000000000..45b983be3 --- /dev/null +++ b/test/command/3880.txt @@ -0,0 +1 @@ +hi diff --git a/test/writers-lang-and-dir.latex b/test/writers-lang-and-dir.latex index b8481c879..ae29cd1bb 100644 --- a/test/writers-lang-and-dir.latex +++ b/test/writers-lang-and-dir.latex @@ -44,6 +44,12 @@ \let\oldsubparagraph\subparagraph \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \fi + +% set default figure placement to htbp +\makeatletter +\def\fps@figure{htbp} +\makeatother + \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \usepackage[shorthands=off,ngerman,british,nswissgerman,spanish,french,main=english]{babel} \newcommand{\textgerman}[2][]{\foreignlanguage{ngerman}{#2}} @@ -77,12 +83,6 @@ \newenvironment{LTR}{\beginL}{\endL} \fi -% set default figure placement to htbp -\makeatletter -\def\fps@figure{htbp} -\makeatother - - \date{} \begin{document} |