[erlang-questions] Different result using io_lib:format under version 21, Is this expected?
Sölvi Páll Ásgeirsson
Tue Jun 26 22:04:12 CEST 2018
Both are legal return values from io_lib:format/2; it's defined such
that it might return deep lists.
I'd suggest that you flatten the output in your tests and don't rely
on a specific structure.
You can do that by using e.g. the built-in function iolist_to_binary/1
However, you do not need to, and should not, flatten the list before
writing it to a file or a socket.
I've found that https://prog21.dadgum.com/70.html explains the concept
Sölvi Páll Á.
On Tue, Jun 26, 2018 at 5:43 PM, chris casilli
> A few of my tests started failing when run under the newer versions 21.0.
> I wanted to ensure this is expected new behavior, before I modify my code to match new results:
> With the previous versions this was the result:
> This is the current result under the new version 21.0 & 20.0.1
> Please let me know if this is expected and the new expected result.
> Kind Regards,
> Chris Casilli
> erlang-questions mailing list
More information about the erlang-questions