From d5520ac4fcdbaf919a5c346e53752a89d040f913 Mon Sep 17 00:00:00 2001 From: Alexander Plavin Date: Wed, 3 Jul 2024 06:42:22 -0400 Subject: [PATCH] more show() tests --- test/test_core.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_core.jl b/test/test_core.jl index a681d85f..3232bf68 100644 --- a/test/test_core.jl +++ b/test/test_core.jl @@ -462,6 +462,8 @@ end @testset "full and compact show" begin @test sprint(show, (@optic _.a)) == "(@o _.a)" @test sprint(show, (@optic _.a + 1)) == "(@o _.a + 1)" + @test sprint(show, (@optic (_.a + 1) * 2)) == "(@o (_.a + 1) * 2)" + @test sprint(show, (@optic (_.a * 2) + 1)) == "(@o (_.a * 2) + 1)" @test sprint(show, (@optic log(_.a[2]))) == "(@o log(_.a[2]))" @test sprint(show, (@optic log(_).a[2])) == "(@o _.a[2]) ∘ log" # could be shorter, but difficult to dispatch correctly without piracy @test sprint(show, (@optic log(_.a[2])); context=:compact => true) == "log(_.a[2])"