From a76c6df826289f09293723e2ed56237684d5aca0 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 12 Sep 2012 19:35:06 -0700 Subject: More mediawiki reader tests. --- tests/mediawiki-reader.native | 21 +++++++++++++++++-- tests/mediawiki-reader.wiki | 47 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/mediawiki-reader.native b/tests/mediawiki-reader.native index e8f33c062..61dff0a6e 100644 --- a/tests/mediawiki-reader.native +++ b/tests/mediawiki-reader.native @@ -51,7 +51,24 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []}) ,Para [Str "bud"] ,Para [Str "another"] ,Header 2 [Str "raw",Space,Str "html"] -,Para [Str "hi",Space,RawInline "html" "",Emph [Str "there"],RawInline "html" "",Str "."] +,Para [Str "hi",Space,RawInline "html" "",Emph [Str "there"],RawInline "html" "",Str ".",Space,RawInline "html" "",Str "inserted",RawInline "html" ""] ,RawBlock "html" "
" ,Para [Str "hi",Space,Emph [Str "there"]] -,RawBlock "html" "
"] +,RawBlock "html" "" +,Header 2 [Str "sup,",Space,Str "sub,",Space,Str "del"] +,Para [Str "H",Subscript [Str "2"],Str "O",Space,Str "base",Superscript [Emph [Str "exponent"]],Space,Strikeout [Str "hello"]] +,Header 2 [Str "inline",Space,Str "code"] +,Para [Code ("",[],[]) "*\8594*",Space,Code ("",[],[]) "typed",Space,Code ("",["haskell"],[]) ">>="] +,Header 2 [Str "code",Space,Str "blocks"] +,CodeBlock ("",[],[]) "case xs of\n (_:_) -> reverse xs\n [] -> ['*']" +,CodeBlock ("",["haskell"],[]) "case xs of\n (_:_) -> reverse xs\n [] -> ['*']" +,CodeBlock ("",["ruby","numberLines"],[("startFrom","100")]) "widgets.each do |w|\n print w.price\nend" +,Header 2 [Str "block",Space,Str "quotes"] +,Para [Str "Regular",Space,Str "paragraph"] +,BlockQuote + [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote."] + ,Para [Str "With",Space,Str "two",Space,Str "paragraphs."]] +,Para [Str "Nother",Space,Str "paragraph."] +,Header 2 [Str "external",Space,Str "links"] +,Para [Link [Emph [Str "Google"],Space,Str "search",Space,Str "engine"] ("http://google.com","")] +,Para [Link [Str "http://johnmacfarlane.net/pandoc/"] ("http://johnmacfarlane.net/pandoc/","")]] diff --git a/tests/mediawiki-reader.wiki b/tests/mediawiki-reader.wiki index afee78007..b1f6b06c4 100644 --- a/tests/mediawiki-reader.wiki +++ b/tests/mediawiki-reader.wiki @@ -91,9 +91,56 @@ another == raw html == hi ''there''. +inserted
hi ''there''
+== sup, sub, del == + +H2O +base''exponent'' +hello + +== inline code == + +*→* typed >>= + +== code blocks == + +
+case xs of
+     (_:_) -> reverse xs
+     []    -> ['*']
+
+ + +case xs of + (_:_) -> reverse xs + [] -> ['*'] + + + +widgets.each do |w| + print w.price +end + + +== block quotes == + +Regular paragraph +
+This is a block quote. + +With two paragraphs. +
+Nother paragraph. + +== external links == + +[http://google.com ''Google'' search engine] + +http://johnmacfarlane.net/pandoc/ + -- cgit v1.2.3