aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/file_name_SUITE.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-03-07 13:23:00 +0100
committerMicael Karlberg <[email protected]>2011-03-07 13:23:00 +0100
commit0674fe5dfde78dd611ee17d97541c4f02fddf774 (patch)
treeef23074d46e14a2af8b983315986d97226aca419 /lib/kernel/test/file_name_SUITE.erl
parentd9ca1a4e66bed40b4bf4ed7b9e734192d6f6d00a (diff)
parent29a6063aadd2b3b81442a711ee262ff347ca88fc (diff)
downloadotp-0674fe5dfde78dd611ee17d97541c4f02fddf774.tar.gz
otp-0674fe5dfde78dd611ee17d97541c4f02fddf774.tar.bz2
otp-0674fe5dfde78dd611ee17d97541c4f02fddf774.zip
Merge branch 'dev' into bmk/snmp/snmpc/OTP-9004
Diffstat (limited to 'lib/kernel/test/file_name_SUITE.erl')
-rw-r--r--lib/kernel/test/file_name_SUITE.erl41
1 files changed, 34 insertions, 7 deletions
diff --git a/lib/kernel/test/file_name_SUITE.erl b/lib/kernel/test/file_name_SUITE.erl
index fea4df8539..33c8e5bbe4 100644
--- a/lib/kernel/test/file_name_SUITE.erl
+++ b/lib/kernel/test/file_name_SUITE.erl
@@ -18,7 +18,7 @@
%% %CopyrightEnd%
%%
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
-include_lib("kernel/include/file.hrl").
%%
@@ -70,7 +70,10 @@
%% list_dir
%% read_link
--export([all/1,init_per_testcase/2, fin_per_testcase/2]).
+-export([all/0,groups/0,suite/0,
+ init_per_suite/1,end_per_suite/1,
+ init_per_group/2,end_per_group/2,
+ init_per_testcase/2, end_per_testcase/2]).
-export([normal/1,icky/1,very_icky/1,normalize/1]).
@@ -78,13 +81,29 @@ init_per_testcase(_Func, Config) ->
Dog = test_server:timetrap(test_server:seconds(60)),
[{watchdog,Dog}|Config].
-fin_per_testcase(_Func, Config) ->
+end_per_testcase(_Func, Config) ->
Dog = ?config(watchdog, Config),
test_server:timetrap_cancel(Dog).
+suite() -> [{ct_hooks,[ts_install_cth]}].
-all(suite) ->
- [normal,icky,very_icky,normalize].
+all() ->
+ [normal, icky, very_icky, normalize].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
normalize(suite) ->
[];
@@ -507,8 +526,16 @@ check_very_icky(Mod) ->
end,
?line {NumOK,NumNOK} = filelib:fold_files(".",".*",true,fun(_F,{N,M}) when is_list(_F) -> io:format("~ts~n",[_F]),{N+1,M}; (_F,{N,M}) -> io:format("~p~n",[_F]),{N,M+1} end,{0,0}),
?line ok = filelib:fold_files(".",[1076,1089,1072,124,46,42],true,fun(_F,_) -> ok end,false),
- ?line SF3 = unicode:characters_to_binary("���subfil3",file:native_name_encoding()),
- ?line Sorted = lists:sort([SF3,<<"���subfil2">>]),
+ ?line SF3 = unicode:characters_to_binary("���subfil3",
+ file:native_name_encoding()),
+ ?line SF2 = case treat_icky(<<"���subfil2">>) of
+ LF2 when is_list(LF2) ->
+ unicode:characters_to_binary(LF2,
+ file:native_name_encoding());
+ BF2 ->
+ BF2
+ end,
+ ?line Sorted = lists:sort([SF3,SF2]),
?line Sorted = lists:sort(filelib:wildcard("*",<<"���subdir2">>)),
ok
catch