diff --git a/test/markdown_test.jl b/test/markdown_test.jl new file mode 100644 index 0000000..f07bbd1 --- /dev/null +++ b/test/markdown_test.jl @@ -0,0 +1,72 @@ +using Base.Test +import Weave: Markdown2HTML + +# Test markdown2html writer + +html = Markdown2HTML.html(Markdown.parse(""" + +# H1 + +## H2 + +## H3 + + +Some **text** with different [^note] *formatting* and \$math\$ and text. + +`some code` with [link](http://github.com) + +[^note]: test note + +--- + +\$more math\$ + +* List one +* List two + +1. List one +2. List two + +```julia +x = 3 +``` + +!!! note "Something" + + Test admonition with ![Image](link/to/image.png) + +> Some important quote + +""")) + +ref_html = """
Some text with different [note] formatting and \$math\$ and text.
+some code
with link
note
test note
+\\[more math\\]
+List one
+List two
+List one
+List two
+x = 3
+Something
Test admonition with
++""" + +@test html == ref_html diff --git a/test/runtests.jl b/test/runtests.jl index b72e851..9267f3d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -12,6 +12,7 @@ include("convert_test.jl") info("Testing formatters") include("formatter_test.jl") +include("markdown_test.jl") info("Testing figure formatters") include("figureformatter_test.jl")Some important quote
+