From 6bea8e3d51ab9f02c2220a84b7c291c477904aa6 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Mon, 29 Nov 2021 18:44:22 -0500 Subject: [PATCH] Test: Fix indenting on verbose no-failure report (#43251) --- stdlib/Test/src/Test.jl | 4 ++-- stdlib/Test/test/runtests.jl | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/stdlib/Test/src/Test.jl b/stdlib/Test/src/Test.jl index 2f3c8eb220d39..52afd00acd1a2 100644 --- a/stdlib/Test/src/Test.jl +++ b/stdlib/Test/src/Test.jl @@ -1114,8 +1114,8 @@ end function get_alignment(ts::DefaultTestSet, depth::Int) # The minimum width at this depth is ts_width = 2*depth + length(ts.description) - # If all passing, no need to look at children - !ts.anynonpass && return ts_width + # If not verbose and all passing, no need to look at children + !ts.verbose && !ts.anynonpass && return ts_width # Return the maximum of this width and the minimum width # for all children (if they exist) isempty(ts.results) && return ts_width diff --git a/stdlib/Test/test/runtests.jl b/stdlib/Test/test/runtests.jl index 1b94deb58b060..1550f94e8f789 100644 --- a/stdlib/Test/test/runtests.jl +++ b/stdlib/Test/test/runtests.jl @@ -1079,17 +1079,17 @@ end @testset "verbose option" begin expected = """ - Test Summary: | Pass Total - Parent | 9 9 - Child 1 | 3 3 - Child 1.1 | 1 1 - Child 1.2 | 1 1 - Child 1.3 | 1 1 - Child 2 | 3 3 - Child 3 | 3 3 - Child 3.1 | 1 1 - Child 3.2 | 1 1 - Child 3.3 | 1 1 + Test Summary: | Pass Total + Parent | 9 9 + Child 1 | 3 3 + Child 1.1 (long name) | 1 1 + Child 1.2 | 1 1 + Child 1.3 | 1 1 + Child 2 | 3 3 + Child 3 | 3 3 + Child 3.1 | 1 1 + Child 3.2 | 1 1 + Child 3.3 | 1 1 """ mktemp() do f, _ @@ -1099,7 +1099,7 @@ end @testset "Parent" verbose = true begin @testset "Child 1" verbose = true begin - @testset "Child 1.1" begin + @testset "Child 1.1 (long name)" begin @test 1 == 1 end