From 2f16671975604a657b7efacbeec87173460114f7 Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Tue, 18 May 2021 21:53:54 +0200 Subject: [PATCH] add test --- test/test_pgfplotsx.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test_pgfplotsx.jl b/test/test_pgfplotsx.jl index b105de42..18fd68e5 100644 --- a/test/test_pgfplotsx.jl +++ b/test/test_pgfplotsx.jl @@ -338,6 +338,16 @@ end plots = filter(x -> x isa PGFPlotsX.Plot, axis.contents) @test length(plots) == 9 end # testset + @testset "Groups and Subplots" begin + group = rand(map((i->begin + "group $(i)" + end), 1:4), 100) + pl = plot(rand(100), layout = @layout([a b; c]), group = group, linetype = [:bar :scatter :steppre], linecolor = :match) + Plots._update_plot_object(pl) + axis = Plots.pgfx_axes(pl.o)[1] + legend_entries = filter(x -> x isa PGFPlotsX.LegendEntry, axis.contents) + @test length(legend_entries) == 2 + end end # testset @testset "Extra kwargs" begin