aboutsummaryrefslogtreecommitdiffstats
path: root/lib/parsetools/test/yecc_SUITE.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2011-09-13 12:02:19 +0200
committerHenrik Nord <[email protected]>2011-09-13 12:02:23 +0200
commite9e118a25ee822e4568d785844d249e083cd88cf (patch)
tree636bddf9f6d41aefdf36cd6821560df4a66d249b /lib/parsetools/test/yecc_SUITE.erl
parenta40655461a03f6b075a1140810f020f5b2bf35b1 (diff)
parentbbdc6a3c0fac080af7b60e6cf7d9732532027939 (diff)
downloadotp-e9e118a25ee822e4568d785844d249e083cd88cf.tar.gz
otp-e9e118a25ee822e4568d785844d249e083cd88cf.tar.bz2
otp-e9e118a25ee822e4568d785844d249e083cd88cf.zip
Merge branch 'ta/werror' into dev
* ta/werror: snmp: extend warnings_as_errors test systools: add warnings_as_errors option asn1ct: add warnings_as_errors option leex: optimize werror/1 yecc: optimize werror/1 yecc: use more descriptive name: 'werror' leex: use more descriptive name: 'werror' compile: optimize werror/1 compile: log warnings as errors if -Werror is enabled yecc: log warnings as errors if -Werror is enabled leex: log warnings as errors if -Werror is enabled yecc: honour -Werror passed from erlc leex: honour -Werror passed from erlc Do not write beam file if Werr and warnings /= [] parsetools: test if warnings_as_errors writes file OTP-9536
Diffstat (limited to 'lib/parsetools/test/yecc_SUITE.erl')
-rw-r--r--lib/parsetools/test/yecc_SUITE.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/parsetools/test/yecc_SUITE.erl b/lib/parsetools/test/yecc_SUITE.erl
index 0133524950..a5f66b48e9 100644
--- a/lib/parsetools/test/yecc_SUITE.erl
+++ b/lib/parsetools/test/yecc_SUITE.erl
@@ -173,6 +173,7 @@ syntax(Config) when is_list(Config) ->
%% Report errors. Very simple test of format_error/1.
Ret = [return, {report, true}],
Filename = filename:join(Dir, "file.yrl"),
+ Parserfile = filename:join(Dir, "file.erl"),
Parserfile1 = filename:join(Dir, "a file"),
?line ok = file:write_file(Filename, <<"">>),
@@ -248,12 +249,17 @@ syntax(Config) when is_list(Config) ->
yecc:file(Filename, Ret),
%% Bad declaration with warnings_as_errors.
+ ok = file:delete(Parserfile),
error = yecc:file(Filename, [warnings_as_errors]),
+ false = filelib:is_regular(Parserfile),
error = yecc:file(Filename, [return_warnings,warnings_as_errors]),
- {ok,_,[{_,[{2,yecc,bad_declaration}]}]} =
- yecc:file(Filename, [return_warnings]),
+ false = filelib:is_regular(Parserfile),
{error,_,[{_,[{2,yecc,bad_declaration}]}]} =
yecc:file(Filename, [return_errors,warnings_as_errors]),
+ false = filelib:is_regular(Parserfile),
+ {ok,_,[{_,[{2,yecc,bad_declaration}]}]} =
+ yecc:file(Filename, [return_warnings]),
+ true = filelib:is_regular(Parserfile),
%% Bad declaration.
?line ok = file:write_file(Filename,