diff --git a/test/documents/plotsjl/plotsjl_test_gr.md.ref b/test/documents/plotsjl/plotsjl_test_gr.md.ref index 0be12b3..1ae8320 100644 --- a/test/documents/plotsjl/plotsjl_test_gr.md.ref +++ b/test/documents/plotsjl/plotsjl_test_gr.md.ref @@ -1,7 +1,7 @@ ~~~~{.julia} using Plots gr() -x = linspace(0, 2*pi) +x = range(0, stop=2π, length=50) println(x) ~~~~~~~~~~~~~ diff --git a/test/documents/plotsjl/plotsjl_test_gr.tex.ref b/test/documents/plotsjl/plotsjl_test_gr.tex.ref index 0135645..9705a33 100644 --- a/test/documents/plotsjl/plotsjl_test_gr.tex.ref +++ b/test/documents/plotsjl/plotsjl_test_gr.tex.ref @@ -1,7 +1,7 @@ \begin{juliacode} using Plots gr() -x = linspace(0, 2*pi) +x = range(0, stop=2π, length=50) println(x) \end{juliacode} \begin{juliaout} diff --git a/test/documents/plotsjl_test_gr.jmd b/test/documents/plotsjl_test_gr.jmd index 839ec31..77a3396 100644 --- a/test/documents/plotsjl_test_gr.jmd +++ b/test/documents/plotsjl_test_gr.jmd @@ -3,7 +3,7 @@ ```julia using Plots gr() -x = linspace(0, 2*pi) +x = range(0, stop=2π, length=50) println(x) p = plot(x, sin.(x), size =(900,300)) p @@ -21,5 +21,5 @@ scatter!(rand(100),markersize=6,c=:orange) ```{julia;echo=false; fig_cap="A random walk."; label="random"} -plot(cumsum(randn(1000, 1))) +plot(cumsum(randn(1000, 1), dims=1)) ``` diff --git a/test/figureformatter_test.jl b/test/figureformatter_test.jl index a8df3e7..f3c2b1d 100644 --- a/test/figureformatter_test.jl +++ b/test/figureformatter_test.jl @@ -15,12 +15,13 @@ chunk.figures = ["figs/figures_plot1.png"] @test Weave.formatfigures(chunk, Weave.github) == "![](figs/figures_plot1.png)\n" @test Weave.formatfigures(chunk, Weave.hugo) == "{{< figure src=\"../figs/figures_plot1.png\" >}}" @test Weave.formatfigures(chunk, Weave.multimarkdown) == "![][figs/figures_plot1.png]\n\n[figs/figures_plot1.png]: figs/figures_plot1.png \n" -@test Weave.formatfigures(chunk, Weave.adoc) == "image::figs/figures_plot1.png[width=nothing]\n" -@test Weave.formatfigures(chunk, Weave.rst) == ".. image:: figs/figures_plot1.png\n :width: nothing\n\n" @test Weave.formatfigures(chunk, Weave.md2html) == "\n" -chunk.options[:fig_cap] = "Nice plot" chunk.options[:out_width] = "100%" +@test Weave.formatfigures(chunk, Weave.adoc) == "image::figs/figures_plot1.png[width=100%]\n" +@test Weave.formatfigures(chunk, Weave.rst) == ".. image:: figs/figures_plot1.png\n :width: 100%\n\n" + +chunk.options[:fig_cap] = "Nice plot" @test Weave.formatfigures(chunk, Weave.tex) == "\\begin{figure}[!h]\n\\center\n\\includegraphics[width=100%]{figs/figures_plot1.png}\n\\caption{Nice plot}\n\\end{figure}\n" @test Weave.formatfigures(chunk, Weave.pandoc) == "![Nice plot](figs/figures_plot1.png){width=100%}\n" @test Weave.formatfigures(chunk, Weave.md2tex) == "\\begin{figure}[!h]\n\\center\n\\includegraphics[width=100%]{figs/figures_plot1.png}\n\\caption{Nice plot}\n\\end{figure}\n" diff --git a/test/runtests.jl b/test/runtests.jl index 71f71c2..39c973c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -35,7 +35,7 @@ using Test end @testset "Plots" begin - info("Test: Weaving with Plots.jl") + @info("Test: Weaving with Plots.jl") include("plotsjl_test.jl") end