[erlang-questions] Getting eunit to display the full term?

Garrett Smith g@REDACTED
Mon Jul 4 07:01:12 CEST 2011


On Sun, Jul 3, 2011 at 1:24 PM, Rudolph van Graan <rvg.mailing@REDACTED> wrote:
> Hi there,
>
> Is there a simple way (other than changing the source) to make eUnit display
> the entire term that didn't match in its output instead of the ...
> truncation? I find it pointless to have write a manual version of the test
> just to see what is not matching.

It's not elegant, but I insert io:format("~p", [Result]) in places
where the result gets truncated.

Output via io:format is suppressed when the test succeeds, suggesting
that this is somehow a feature.

I would argue though that this is a design flaw in eunit -- results
should not be truncated.

Garrett



More information about the erlang-questions mailing list