aboutsummaryrefslogtreecommitdiffstats
path: root/lib/parsetools/test
diff options
context:
space:
mode:
authorTuncer Ayaz <[email protected]>2011-05-27 13:22:43 +0200
committerTuncer Ayaz <[email protected]>2011-06-01 11:41:59 +0200
commit8f9203ccd0c64cb4b03792e5599b27af26e2fcde (patch)
treea38db7161822086cb85576d4003f7ef90484a527 /lib/parsetools/test
parent762125d74a87b0919dae26da5524ac9bc70b599c (diff)
downloadotp-8f9203ccd0c64cb4b03792e5599b27af26e2fcde.tar.gz
otp-8f9203ccd0c64cb4b03792e5599b27af26e2fcde.tar.bz2
otp-8f9203ccd0c64cb4b03792e5599b27af26e2fcde.zip
leex: add warnings_as_errors option
Diffstat (limited to 'lib/parsetools/test')
-rw-r--r--lib/parsetools/test/leex_SUITE.erl13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/parsetools/test/leex_SUITE.erl b/lib/parsetools/test/leex_SUITE.erl
index 406c40b82a..48312445ef 100644
--- a/lib/parsetools/test/leex_SUITE.erl
+++ b/lib/parsetools/test/leex_SUITE.erl
@@ -152,6 +152,19 @@ file(Config) when is_list(Config) ->
?line writable(Dotfile),
file:delete(Dotfile),
+ Warn = <<"Definitions.1998\n"
+ "D = [0-9]\n"
+ "Rules.\n"
+ "{L}+ : {token,{word,TokenLine,TokenChars}}.\n"
+ "Erlang code.\n">>,
+ ok = file:write_file(Filename, Warn),
+ error = leex:file(Filename, [warnings_as_errors]),
+ error = leex:file(Filename, [return_warnings,warnings_as_errors]),
+ {ok,Scannerfile,[{Filename,[{1,leex,ignored_characters}]}]} =
+ leex:file(Filename, [return_warnings]),
+ {error,_,[{Filename,[{1,leex,ignored_characters}]}]} =
+ leex:file(Filename, [return_errors,warnings_as_errors]),
+
file:delete(Filename),
ok.