diff options
author | Fredrik Gustafsson <[email protected]> | 2012-08-14 15:30:03 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2012-08-14 15:30:03 +0200 |
commit | 160bf5da0e03f39b468ebba5d39d1658c8a370e6 (patch) | |
tree | e0d7bcbde2f11b6b8def23ad8de6bc6abc3c2290 /lib/compiler/test/error_SUITE.erl | |
parent | ce6691c02f5bea8ecb0478edd68a555067de37d2 (diff) | |
parent | 9492bf7abbf5e43a9bdada5b0ace0432ce1f4223 (diff) | |
download | otp-160bf5da0e03f39b468ebba5d39d1658c8a370e6.tar.gz otp-160bf5da0e03f39b468ebba5d39d1658c8a370e6.tar.bz2 otp-160bf5da0e03f39b468ebba5d39d1658c8a370e6.zip |
Merge branch 'maint', remote-tracking branch 'upstream'
Diffstat (limited to 'lib/compiler/test/error_SUITE.erl')
-rw-r--r-- | lib/compiler/test/error_SUITE.erl | 15 |
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) -> |