aboutsummaryrefslogtreecommitdiffstats
path: root/lib/parsetools/test/leex_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/parsetools/test/leex_SUITE.erl')
-rw-r--r--lib/parsetools/test/leex_SUITE.erl20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/parsetools/test/leex_SUITE.erl b/lib/parsetools/test/leex_SUITE.erl
index 23ad16f98d..1e50aedf07 100644
--- a/lib/parsetools/test/leex_SUITE.erl
+++ b/lib/parsetools/test/leex_SUITE.erl
@@ -152,6 +152,24 @@ file(Config) when is_list(Config) ->
?line writable(Dotfile),
file:delete(Dotfile),
+ ok = file:delete(Scannerfile),
+ 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]),
+ false = filelib:is_regular(Scannerfile),
+ error = leex:file(Filename, [return_warnings,warnings_as_errors]),
+ false = filelib:is_regular(Scannerfile),
+ {error,_,[{Filename,[{1,leex,ignored_characters}]}]} =
+ leex:file(Filename, [return_errors,warnings_as_errors]),
+ false = filelib:is_regular(Scannerfile),
+ {ok,Scannerfile,[{Filename,[{1,leex,ignored_characters}]}]} =
+ leex:file(Filename, [return_warnings]),
+ true = filelib:is_regular(Scannerfile),
+
file:delete(Filename),
ok.
@@ -551,7 +569,7 @@ ex2(Config) when is_list(Config) ->
<<"
%%% File : erlang_scan.xrl
%%% Author : Robert Virding
-%%% Purpose : Tkoen definitions for Erlang.
+%%% Purpose : Token definitions for Erlang.
Definitions.
O = [0-7]