소스 검색

Remove the workaround for the bug when printing empty binaries in W mode

The fix for this was merged in R16 somewhere, so this workaround is no
longer needed, and fixes the EQC test from spotting the divergent
behaviour with io_lib.

See also: http://erlang.org/pipermail/erlang-patches/2012-September/003034.html
pull/192/head
Andrew Thompson 11 년 전
부모
커밋
4c7bd96d62
1개의 변경된 파일5개의 추가작업 그리고 8개의 파일을 삭제
  1. +5
    -8
      src/lager_trunc_io.erl

+ 5
- 8
src/lager_trunc_io.erl 파일 보기

@ -127,13 +127,10 @@ print(Atom, _Max, #print_options{force_strings=NoQuote}) when is_atom(Atom) ->
end,
{R, length(R)};
print(Bin, _Max, O = #print_options{depth=1}) when is_binary(Bin) ->
case O#print_options.lists_as_strings of
true when Bin == <<>> ->
{"<<>>", 4};
_ ->
{"<<...>>", 7}
end;
print(<<>>, _Max, #print_options{depth=1}) ->
{"<<>>", 4};
print(Bin, _Max, #print_options{depth=1}) when is_binary(Bin) ->
{"<<...>>", 7};
print(<<>>, _Max, Options) ->
case Options#print_options.force_strings of
true ->
@ -766,7 +763,7 @@ depth_limit_test() ->
%% I don't even know...
?assertEqual("<<>>", lists:flatten(format("~P", [<<>>, 1], 50))),
?assertEqual("<<...>>", lists:flatten(format("~W", [<<>>, 1], 50))),
?assertEqual("<<>>", lists:flatten(format("~W", [<<>>, 1], 50))),
?assertEqual("{abc,<<\"abc\\\"\">>}", lists:flatten(format("~P", [{abc,<<"abc\"">>}, 4], 50))),

불러오는 중...
취소
저장