aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/epp_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-09-29 13:59:47 +0200
committerBjörn Gustavsson <[email protected]>2015-10-29 15:58:57 +0100
commit30a4adb7d4b534a512a717244ebaeb29c78cddc1 (patch)
treecbbee78387ad1dfa1d3e603b197e6baf49dc596d /lib/stdlib/test/epp_SUITE.erl
parentd1eb2b56a18eae3d967855f4a024694f34b8776d (diff)
downloadotp-30a4adb7d4b534a512a717244ebaeb29c78cddc1.tar.gz
otp-30a4adb7d4b534a512a717244ebaeb29c78cddc1.tar.bz2
otp-30a4adb7d4b534a512a717244ebaeb29c78cddc1.zip
epp_SUITE: Add smoke and coverage test of format_error/1
Diffstat (limited to 'lib/stdlib/test/epp_SUITE.erl')
-rw-r--r--lib/stdlib/test/epp_SUITE.erl15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/stdlib/test/epp_SUITE.erl b/lib/stdlib/test/epp_SUITE.erl
index 4e5df661b3..2ac2316ce9 100644
--- a/lib/stdlib/test/epp_SUITE.erl
+++ b/lib/stdlib/test/epp_SUITE.erl
@@ -1528,8 +1528,11 @@ compile_test(Config, Test0) ->
warnings(File, Ws) ->
case lists:append([W || {F, W} <- Ws, F =:= File]) of
- [] -> [];
- L -> {warnings, L}
+ [] ->
+ [];
+ L ->
+ call_format_error(L),
+ {warnings, L}
end.
compile_file(File, Opts) ->
@@ -1540,12 +1543,20 @@ compile_file(File, Opts) ->
end.
errs([{File,Es}|L], File) ->
+ call_format_error(Es),
Es ++ errs(L, File);
errs([_|L], File) ->
errs(L, File);
errs([], _File) ->
[].
+%% Smoke test and coverage of format_error/1.
+call_format_error([{_,M,E}|T]) ->
+ _ = M:format_error(E),
+ call_format_error(T);
+call_format_error([]) ->
+ ok.
+
epp_parse_file(File, Opts) ->
case epp:parse_file(File, Opts) of
{ok, Forms} ->