aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/epp_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-11-17 07:42:24 +0100
committerBjörn Gustavsson <[email protected]>2015-11-17 09:14:06 +0100
commit7bfba5dfb5ec581880290b3fea8645504064dd5b (patch)
treeeafe147ddcc14ab92d437e60bb0b79de7cc84db2 /lib/stdlib/test/epp_SUITE.erl
parent7fc200b2f54d0c4b1dbc9edaee1fa6005a230d35 (diff)
downloadotp-7bfba5dfb5ec581880290b3fea8645504064dd5b.tar.gz
otp-7bfba5dfb5ec581880290b3fea8645504064dd5b.tar.bz2
otp-7bfba5dfb5ec581880290b3fea8645504064dd5b.zip
epp_SUITE: Extend smoke and cover test of format_error/1
30a4adb7 added smoke and cover test of format_error/1, but did not catch calls that went through check/2.
Diffstat (limited to 'lib/stdlib/test/epp_SUITE.erl')
-rw-r--r--lib/stdlib/test/epp_SUITE.erl20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/stdlib/test/epp_SUITE.erl b/lib/stdlib/test/epp_SUITE.erl
index d2715216d3..abd2501ce7 100644
--- a/lib/stdlib/test/epp_SUITE.erl
+++ b/lib/stdlib/test/epp_SUITE.erl
@@ -1518,15 +1518,17 @@ eval_tests(Config, Fun, Tests) ->
check_test(Config, Test) ->
Filename = "epp_test.erl",
- ?line PrivDir = ?config(priv_dir, Config),
- ?line File = filename:join(PrivDir, Filename),
- ?line ok = file:write_file(File, Test),
- ?line case epp:parse_file(File, [PrivDir], []) of
- {ok,Forms} ->
- [E || E={error,_} <- Forms];
- {error,Error} ->
- Error
- end.
+ PrivDir = ?config(priv_dir, Config),
+ File = filename:join(PrivDir, Filename),
+ ok = file:write_file(File, Test),
+ case epp:parse_file(File, [PrivDir], []) of
+ {ok,Forms} ->
+ Errors = [E || E={error,_} <- Forms],
+ call_format_error([E || {error,E} <- Errors]),
+ Errors;
+ {error,Error} ->
+ Error
+ end.
compile_test(Config, Test0) ->
Test = [<<"-module(epp_test). -compile(export_all). ">>, Test0],