aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-08-14 15:27:18 +0200
committerFredrik Gustafsson <[email protected]>2012-08-14 15:27:18 +0200
commitdf8e67e203b83f95d1e098fec88ad5d0ad840069 (patch)
tree7609e4eddc4fd4757791ce131f6dc131060b7bfc /lib/compiler/test
parent0c9d90f314f364e5b1301ec89d762baabc57c7aa (diff)
parentd932ad582676f1593d917f222b1d8dec71fe88b3 (diff)
downloadotp-df8e67e203b83f95d1e098fec88ad5d0ad840069.tar.gz
otp-df8e67e203b83f95d1e098fec88ad5d0ad840069.tar.bz2
otp-df8e67e203b83f95d1e098fec88ad5d0ad840069.zip
Merge branch 'nox/compile-column-numbers' into maint
* nox/compile-column-numbers: Fix messages ordering with column numbers Fix type compile:err_info/0 Test column number reporting in error_SUITE Fix printing of errors with column numbers Create a new "column" option in compile Allow setting of initial position in epp Export type erl_scan:location/0
Diffstat (limited to 'lib/compiler/test')
-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) ->