2014-12-09 14:32:41 +01:00
|
|
|
using Weave
|
|
|
|
using Base.Test
|
|
|
|
|
|
|
|
weave("documents/pyplot_formats.txt", plotlib="pyplot", doctype="tex")
|
|
|
|
result = readall(open("documents/pyplot_formats.tex"))
|
|
|
|
ref = readall(open("documents/pyplot_formats_ref.tex"))
|
|
|
|
result = replace(result, r"\s*PyObject.*\n", "") #Remove PyObjects, because they change
|
|
|
|
ref = replace(ref, r"\s*PyObject.*\n", "")
|
|
|
|
@test result == ref
|
|
|
|
|
|
|
|
weave("documents/pyplot_formats.txt", plotlib="pyplot", doctype="github")
|
|
|
|
result = readall(open("documents/pyplot_formats.md"))
|
|
|
|
ref = readall(open("documents/pyplot_formats_ref.md"))
|
|
|
|
result = replace(result, r"\s*PyObject.*\n", "")
|
|
|
|
ref = replace(ref, r"\s*PyObject.*\n", "")
|
|
|
|
@test result == ref
|
|
|
|
|
|
|
|
|
|
|
|
weave("documents/pyplot_formats.txt", plotlib="pyplot", doctype="rst", fig_ext=".svg")
|
2015-01-05 15:35:24 +01:00
|
|
|
result = readall(open("documents/pyplot_formats.rst"))
|
|
|
|
ref = readall(open("documents/pyplot_formats_ref.rst"))
|
2014-12-09 14:32:41 +01:00
|
|
|
result = replace(result, r"\s*PyObject.*\n", "")
|
|
|
|
ref = replace(ref, r"\s*PyObject.*\n", "")
|
|
|
|
@test result == ref
|