Weave.jl/test/runtests.jl

74 lines
1.6 KiB
Julia
Raw Normal View History

2020-05-15 17:38:18 +02:00
using Weave, Test
2020-05-15 18:49:55 +02:00
using Weave: WeaveDoc, run_doc
2014-12-06 18:16:45 +01:00
# TODO: add test for header processsing
# TODO: add test for `include_weave`
2020-05-16 16:25:44 +02:00
# constructs `WeaveDoc` from `String` and run it
function mock_doc(str; informat = "markdown", run = true, doctype = "md2html", kwargs...)
2020-05-15 16:51:52 +02:00
f = tempname()
write(f, str)
2020-05-16 16:25:44 +02:00
doc = WeaveDoc(f, informat)
return run ? run_doc(doc; doctype = doctype, kwargs...) : doc
2020-05-15 16:51:52 +02:00
end
2020-05-16 16:25:44 +02:00
macro jmd_str(s) mock_doc(s) end
2018-07-25 20:43:38 +02:00
@testset "Weave" begin
@testset "Chunk options" begin
include("chunk_options.jl")
end
@testset "module evaluation" begin
include("test_module_evaluation.jl")
end
@testset "header" begin
include("test_header.jl")
end
2020-05-09 15:35:45 +02:00
@testset "error rendering" begin
include("test_error_rendering.jl")
end
2020-05-16 14:33:01 +02:00
@testset "conversions" begin
2020-05-15 17:38:18 +02:00
include("test_converter.jl")
2018-07-25 20:43:38 +02:00
end
2020-05-16 16:25:44 +02:00
@testset "display" begin
include("test_display.jl")
end
2018-07-25 20:43:38 +02:00
@testset "Formatters" begin
include("formatter_test.jl")
include("markdown_test.jl")
include("figureformatter_test.jl")
end
@testset "Rich output" begin
include("rich_output.jl")
end
2018-07-26 10:35:17 +02:00
@testset "Plots" begin
include("plotsjl_test.jl")
end
@testset "Cache" begin
include("cache_test.jl")
end
@testset "Gadfly" begin
include("gadfly_formats.jl")
end
@testset "Inline code" begin
include("inline_test.jl")
end
# @testset "Notebooks" begin
# @info("Testing Jupyter options")
# include("notebooks.jl")
# end
end