diff --git a/test/AliasMacro-test.jl b/test/AliasMacro-test.jl index af777859ca..a34a8dc2c3 100644 --- a/test/AliasMacro-test.jl +++ b/test/AliasMacro-test.jl @@ -30,12 +30,23 @@ end @test !(:isbar in names(Bla)) # verify docstring is correctly attached - @test string(@doc Bla.isfoo) == - """ - ``` - isfoo - ``` - - Alias for `is_foo`. - """ + if VERSION >= v"1.12.0-DEV.1223" + @test string(@doc Bla.isfoo) == + """ + ```julia + isfoo + ``` + + Alias for `is_foo`. + """ + else + @test string(@doc Bla.isfoo) == + """ + ``` + isfoo + ``` + + Alias for `is_foo`. + """ + end end diff --git a/test/Attributes-test.jl b/test/Attributes-test.jl index 2e0d09b777..e21e523039 100644 --- a/test/Attributes-test.jl +++ b/test/Attributes-test.jl @@ -1,3 +1,5 @@ +using REPL # needed due to https://github.com/JuliaLang/julia/issues/53349 + module Tmp using AbstractAlgebra @@ -210,14 +212,25 @@ my_derived_type(::Type{Tmp.Container{T}}) where T = T @test y === x # verify docstring is correctly attached - @test string(@doc cached_attr) == - """ - ``` - cached_attr(obj::T) where T - ``` - - A cached attribute. - """ + if VERSION >= v"1.12.0-DEV.1223" + @test string(@doc cached_attr) == + """ + ```julia + cached_attr(obj::T) where T + ``` + + A cached attribute. + """ + else + @test string(@doc cached_attr) == + """ + ``` + cached_attr(obj::T) where T + ``` + + A cached attribute. + """ + end # test function location is tracked accurately (this requires that the # definition of uncached_attr is before that of cached_attr)