Skip to content

Commit 5b4bed3

Browse files
IanButterworthstaticfloat
authored andcommitted
Test: Fix indenting on verbose no-failure report (#43251)
(cherry picked from commit 6bea8e3)
1 parent 8b2e754 commit 5b4bed3

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

stdlib/Test/src/Test.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -925,8 +925,8 @@ end
925925
function get_alignment(ts::DefaultTestSet, depth::Int)
926926
# The minimum width at this depth is
927927
ts_width = 2*depth + length(ts.description)
928-
# If all passing, no need to look at children
929-
!ts.anynonpass && return ts_width
928+
# If not verbose and all passing, no need to look at children
929+
!ts.verbose && !ts.anynonpass && return ts_width
930930
# Return the maximum of this width and the minimum width
931931
# for all children (if they exist)
932932
isempty(ts.results) && return ts_width

stdlib/Test/test/runtests.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -976,17 +976,17 @@ end
976976

977977
@testset "verbose option" begin
978978
expected = """
979-
Test Summary: | Pass Total
980-
Parent | 9 9
981-
Child 1 | 3 3
982-
Child 1.1 | 1 1
983-
Child 1.2 | 1 1
984-
Child 1.3 | 1 1
985-
Child 2 | 3 3
986-
Child 3 | 3 3
987-
Child 3.1 | 1 1
988-
Child 3.2 | 1 1
989-
Child 3.3 | 1 1
979+
Test Summary: | Pass Total
980+
Parent | 9 9
981+
Child 1 | 3 3
982+
Child 1.1 (long name) | 1 1
983+
Child 1.2 | 1 1
984+
Child 1.3 | 1 1
985+
Child 2 | 3 3
986+
Child 3 | 3 3
987+
Child 3.1 | 1 1
988+
Child 3.2 | 1 1
989+
Child 3.3 | 1 1
990990
"""
991991

992992
mktemp() do f, _
@@ -996,7 +996,7 @@ end
996996
997997
@testset "Parent" verbose = true begin
998998
@testset "Child 1" verbose = true begin
999-
@testset "Child 1.1" begin
999+
@testset "Child 1.1 (long name)" begin
10001000
@test 1 == 1
10011001
end
10021002

0 commit comments

Comments
 (0)