aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/error_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compiler/test/error_SUITE.erl')
-rw-r--r--lib/compiler/test/error_SUITE.erl15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/compiler/test/error_SUITE.erl b/lib/compiler/test/error_SUITE.erl
index eb5e50818e..47698ecdb7 100644
--- a/lib/compiler/test/error_SUITE.erl
+++ b/lib/compiler/test/error_SUITE.erl
@@ -22,13 +22,15 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
- head_mismatch_line/1,warnings_as_errors/1, bif_clashes/1]).
+ head_mismatch_line/1,warnings_as_errors/1, bif_clashes/1,
+ column_number/1
+ ]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
test_lib:recompile(?MODULE),
- [head_mismatch_line, warnings_as_errors, bif_clashes].
+ [head_mismatch_line, warnings_as_errors, bif_clashes, column_number].
groups() ->
[].
@@ -166,6 +168,15 @@ bif_clashes(Config) when is_list(Config) ->
+%% Tests that messages are correctly reported with column numbers
+%% if the column option is set.
+column_number(Config) when is_list(Config) ->
+ Ts1 = [{column_number_warning,
+ <<"\nt(X) -> ok.">>,
+ [return_warnings, export_all, column],
+ {warning, [{{2, 3}, erl_lint, {unused_var, 'X'}}]}}],
+ ?line [] = run(Config, Ts1),
+ ok.
%% Tests that a head mismatch is reported on the correct line (OTP-2125).
head_mismatch_line(Config) when is_list(Config) ->