Skip to content

Commit 6bea8e3

Browse files
Test: Fix indenting on verbose no-failure report (#43251)
1 parent ddca0a8 commit 6bea8e3

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
@@ -1114,8 +1114,8 @@ end
11141114
function get_alignment(ts::DefaultTestSet, depth::Int)
11151115
# The minimum width at this depth is
11161116
ts_width = 2*depth + length(ts.description)
1117-
# If all passing, no need to look at children
1118-
!ts.anynonpass && return ts_width
1117+
# If not verbose and all passing, no need to look at children
1118+
!ts.verbose && !ts.anynonpass && return ts_width
11191119
# Return the maximum of this width and the minimum width
11201120
# for all children (if they exist)
11211121
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
@@ -1079,17 +1079,17 @@ end
10791079

10801080
@testset "verbose option" begin
10811081
expected = """
1082-
Test Summary: | Pass Total
1083-
Parent | 9 9
1084-
Child 1 | 3 3
1085-
Child 1.1 | 1 1
1086-
Child 1.2 | 1 1
1087-
Child 1.3 | 1 1
1088-
Child 2 | 3 3
1089-
Child 3 | 3 3
1090-
Child 3.1 | 1 1
1091-
Child 3.2 | 1 1
1092-
Child 3.3 | 1 1
1082+
Test Summary: | Pass Total
1083+
Parent | 9 9
1084+
Child 1 | 3 3
1085+
Child 1.1 (long name) | 1 1
1086+
Child 1.2 | 1 1
1087+
Child 1.3 | 1 1
1088+
Child 2 | 3 3
1089+
Child 3 | 3 3
1090+
Child 3.1 | 1 1
1091+
Child 3.2 | 1 1
1092+
Child 3.3 | 1 1
10931093
"""
10941094

10951095
mktemp() do f, _
@@ -1099,7 +1099,7 @@ end
10991099
11001100
@testset "Parent" verbose = true begin
11011101
@testset "Child 1" verbose = true begin
1102-
@testset "Child 1.1" begin
1102+
@testset "Child 1.1 (long name)" begin
11031103
@test 1 == 1
11041104
end
11051105

0 commit comments

Comments
 (0)