Weave.jl/test/gadfly_formats.jl

61 lines
2.6 KiB
Julia
Raw Normal View History

2016-04-20 20:01:14 +02:00
#Test for Gadfly with different chunk options and figure formatsusing Weave
2016-11-03 13:13:50 +01:00
using Weave
using Base.Test
2014-12-09 21:17:20 +01:00
2017-03-14 08:27:16 +01:00
weave("documents/gadfly_formats_test.txt", doctype = "tex", plotlib="gadfly")
2016-12-20 20:37:39 +01:00
result = readstring("documents/gadfly_formats_test.tex")
ref = readstring("documents/gadfly_formats_test_ref.tex")
@test result == ref
weave("documents/gadfly_formats_test.txt", doctype="tex", fig_ext=".tex", plotlib="gadfly")
2016-12-20 20:37:39 +01:00
result = readstring("documents/gadfly_formats_test.tex")
ref = readstring("documents/gadfly_formats_test_tikz_ref.tex")
@test result == ref
weave("documents/gadfly_formats_test.txt", doctype="tex", fig_ext=".ps", plotlib="gadfly")
2016-12-20 20:37:39 +01:00
result = readstring("documents/gadfly_formats_test.tex")
ref = readstring("documents/gadfly_formats_test_ps_ref.tex")
@test result == ref
weave("documents/gadfly_formats_test.txt", doctype="pandoc", plotlib="gadfly")
2016-12-20 20:37:39 +01:00
result = readstring("documents/gadfly_formats_test.md")
ref = readstring("documents/gadfly_formats_test_pandoc_ref.md")
@test result == ref
weave("documents/gadfly_formats_test.txt", doctype="pandoc", plotlib="gadfly", fig_ext=".svg")
2016-12-20 20:37:39 +01:00
result = readstring("documents/gadfly_formats_test.md")
ref = readstring("documents/gadfly_formats_test_svg_ref.md")
@test result == ref
weave("documents/gadfly_formats_test.txt", doctype="github", plotlib="gadfly", fig_ext=".js.svg")
2016-12-20 20:37:39 +01:00
result = readstring("documents/gadfly_formats_test.md")
ref = readstring("documents/gadfly_formats_test_jssvg_ref.md")
@test result == ref
weave("documents/gadfly_formats_test.txt", doctype="rst", plotlib="gadfly")
2016-12-20 20:37:39 +01:00
result = readstring("documents/gadfly_formats_test.rst")
ref = readstring("documents/gadfly_formats_test_ref.rst")
@test result == ref
2014-12-22 16:23:20 +01:00
weave("documents/gadfly_formats_test.txt", doctype="multimarkdown", plotlib="gadfly")
2016-12-20 20:37:39 +01:00
result = readstring("documents/gadfly_formats_test.md")
ref = readstring("documents/gadfly_formats_test_mmd_ref.md")
@test result == ref
2014-12-22 16:23:20 +01:00
weave("documents/gadfly_formats_test.txt", doctype="asciidoc", plotlib="gadfly",
out_path="documents/output")
2016-12-20 20:37:39 +01:00
result = readstring("documents/output/gadfly_formats_test.txt")
ref = readstring("documents/output/gadfly_formats_test_ref.txt")
2014-12-22 16:23:20 +01:00
@test result == ref
2015-01-09 13:17:56 +01:00
weave("documents/gadfly_markdown_test.jmd", doctype="github",plotlib="gadfly", informat="markdown")
2016-12-20 20:37:39 +01:00
result = readstring("documents/gadfly_markdown_test.md")
ref = readstring("documents/gadfly_markdown_test_ref.md")
2015-01-09 13:17:56 +01:00
@test result == ref
2016-04-22 13:44:30 +02:00
weave("documents/FIR_design.jl", doctype="pandoc", plotlib="gadfly", informat="script")
2016-12-20 20:37:39 +01:00
result = readstring("documents/FIR_design.md")
ref = readstring("documents/FIR_design_ref.md")
2016-04-22 13:44:30 +02:00
@test result == ref