diff options
Diffstat (limited to 'lib/kernel/test/logger_formatter_SUITE.erl')
-rw-r--r-- | lib/kernel/test/logger_formatter_SUITE.erl | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/kernel/test/logger_formatter_SUITE.erl b/lib/kernel/test/logger_formatter_SUITE.erl index f1c64110a1..a2f825f4a9 100644 --- a/lib/kernel/test/logger_formatter_SUITE.erl +++ b/lib/kernel/test/logger_formatter_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2018-2020. All Rights Reserved. +%% Copyright Ericsson AB 2018-2023. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -183,7 +183,7 @@ single_line(_Config) -> ct:log(String3), match = re:run(String3,"\\[1,2,3,4,5,6,7,8,9,10\\]",[{capture,none}]), match = re:run(String3, - "#{a => map,few => accociations,with => a}", + "#{((a => map|with => a|few => accociations)[,}]){3}", [{capture,none}]), %% This part is added to make sure that the previous test made @@ -272,7 +272,7 @@ template(_Config) -> [[nested,subkey]]), String8 = format(info,{"~p",[term]},Meta8,#{template=>Template8, single_line=>true}), - ct:log(String6), + ct:log(String8), SelfStr = pid_to_list(self()), RefStr8 = ref_to_list(Ref8), ListStr = "[list,\"string\",4321,#{},{tuple}]", @@ -345,6 +345,18 @@ template(_Config) -> _ -> ct:fail({full_nested_map_unexpected,MultipleKeysStr10}) end, + Meta11A = #{time=>Time,be_short=>ok}, + Meta11B = #{time=>Time}, + Template11 = + [{be_short, + ["short:",msg], + ["long:[",level,"]",msg]}], + String11A = format(info,{"~p",[term]},Meta11A,#{template=>Template11,single_line=>true}), + String11B = format(info,{"~p",[term]},Meta11B,#{template=>Template11,single_line=>true}), + ct:log(String11A), + ct:log(String11B), + {"short:term","long:[info]term"} = {String11A,String11B}, + ok. format_msg(_Config) -> |