2016-12-19 13:12:10 +01:00
|
|
|
using Weave
|
2018-07-23 12:37:25 +02:00
|
|
|
using Test
|
2017-03-14 08:27:16 +01:00
|
|
|
import Plots
|
2016-12-19 13:12:10 +01:00
|
|
|
|
|
|
|
function publish_test(outfile, format)
|
|
|
|
outfile = joinpath("documents/publish", outfile)
|
|
|
|
infile = "documents/publish_test.jmd"
|
|
|
|
weave(infile, doctype = format, out_path = outfile, template = "templates/mini.tpl")
|
2018-07-23 12:37:25 +02:00
|
|
|
result = read(outfile, String)
|
|
|
|
ref = read(outfile * ".ref", String)
|
2016-12-19 13:12:10 +01:00
|
|
|
@test result == ref
|
2016-12-19 13:46:00 +01:00
|
|
|
rm(outfile)
|
2016-12-19 13:12:10 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
#Test formatters
|
|
|
|
publish_test("publish_tex.tex", "md2tex")
|
2018-01-02 15:51:13 +01:00
|
|
|
#!is_windows() && publish_test("publish_test.html", "md2html")
|