aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/error_SUITE.erl
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2012-06-03 14:27:21 +0200
committerAnthony Ramine <[email protected]>2012-06-03 14:27:21 +0200
commitc98bc0eb21aae3011b09c37c0efd4dd5316b6d30 (patch)
tree705f041211627ea135577a5bbff898e008720adb /lib/compiler/test/error_SUITE.erl
parent5af6bd403862b10693035bebfd88d326541ca4bb (diff)
downloadotp-c98bc0eb21aae3011b09c37c0efd4dd5316b6d30.tar.gz
otp-c98bc0eb21aae3011b09c37c0efd4dd5316b6d30.tar.bz2
otp-c98bc0eb21aae3011b09c37c0efd4dd5316b6d30.zip
Test column number reporting in error_SUITE
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) ->