aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2012-08-23 08:50:10 +0200
committerHans Bolinder <[email protected]>2012-08-23 08:50:10 +0200
commite479ebeb58beaa8261fa90e54681dc30e5ee3085 (patch)
tree23acb7b978672c6e5df27637a7eb6d6a693001a6 /lib/tools
parent533946d9e26034b709c03072645aabafff6a2be2 (diff)
parent6ab59ee359373043f0bb5950b63d7590cd54a3f9 (diff)
downloadotp-e479ebeb58beaa8261fa90e54681dc30e5ee3085.tar.gz
otp-e479ebeb58beaa8261fa90e54681dc30e5ee3085.tar.bz2
otp-e479ebeb58beaa8261fa90e54681dc30e5ee3085.zip
Merge branch 'hb/tools/xref_filenames/OTP-10192' into maint
* hb/tools/xref_filenames/OTP-10192: Allow non-ASCII characters in Xref filanmes
Diffstat (limited to 'lib/tools')
-rw-r--r--lib/tools/src/xref_utils.erl4
-rw-r--r--lib/tools/test/xref_SUITE.erl16
2 files changed, 16 insertions, 4 deletions
diff --git a/lib/tools/src/xref_utils.erl b/lib/tools/src/xref_utils.erl
index 9d4a175d88..680563e9df 100644
--- a/lib/tools/src/xref_utils.erl
+++ b/lib/tools/src/xref_utils.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -141,7 +141,7 @@ is_string([], _) ->
is_string(Term, C) ->
is_string1(Term, C).
-is_string1([H | T], C) when H > C, H < 127 ->
+is_string1([H | T], C) when H > C ->
is_string1(T, C);
is_string1([], _) ->
true;
diff --git a/lib/tools/test/xref_SUITE.erl b/lib/tools/test/xref_SUITE.erl
index 78e49044a5..fd3e111d8d 100644
--- a/lib/tools/test/xref_SUITE.erl
+++ b/lib/tools/test/xref_SUITE.erl
@@ -53,7 +53,7 @@
analyze/1, basic/1, md/1, q/1, variables/1, unused_locals/1]).
-export([
- format_error/1, otp_7423/1, otp_7831/1]).
+ format_error/1, otp_7423/1, otp_7831/1, otp_10192/1]).
-import(lists, [append/2, flatten/1, keysearch/3, member/2, sort/1, usort/1]).
@@ -86,7 +86,7 @@ groups() ->
fun_mfa_r14, fun_mfa_vars, qlc]},
{analyses, [],
[analyze, basic, md, q, variables, unused_locals]},
- {misc, [], [format_error, otp_7423, otp_7831]}].
+ {misc, [], [format_error, otp_7423, otp_7831, otp_10192]}].
init_per_suite(Config) ->
init(Config).
@@ -2515,6 +2515,18 @@ otp_7831(Conf) when is_list(Conf) ->
?line xref:stop(Pid2),
ok.
+otp_10192(suite) -> [];
+otp_10192(doc) ->
+ ["OTP-10192. Allow filenames with character codes greater than 126."];
+otp_10192(Conf) when is_list(Conf) ->
+ PrivDir = ?privdir,
+ {ok, _Pid} = xref:start(s),
+ Dir = filename:join(PrivDir, "�"),
+ ok = file:make_dir(Dir),
+ {ok, []} = xref:add_directory(s, Dir),
+ xref:stop(s),
+ ok.
+
%%%
%%% Utilities
%%%