Skip to content

Commit 23b58a9

Browse files
committed
Merge remote-tracking branch 'u3s_otp/kuba/common_test/empty_heading/OTP-19714' into maint
* u3s_otp/kuba/common_test/empty_heading/OTP-19714: common_test: empty heading resulting with no heading
2 parents e91311a + 09ea2f4 commit 23b58a9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/common_test/src/ct_logs.erl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,12 @@ tc_print(Category,Importance,Format,Args,Opts) ->
553553
undefined -> atom_to_list(Category);
554554
Hd -> Hd
555555
end,
556-
Str = lists:flatten([get_header(Heading),Format,"\n\n"]),
556+
Parts =
557+
case Heading of
558+
"" -> [Format, "\n"];
559+
_ -> [get_header(Heading),Format,"\n\n"]
560+
end,
561+
Str = lists:flatten(Parts),
557562
try
558563
io:format(?def_gl, Str, Args)
559564
catch

0 commit comments

Comments
 (0)