aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-11-18 12:05:29 +0100
committerSiri Hansen <[email protected]>2013-11-18 12:05:29 +0100
commitb5e8344a22b04729db5493f2757ee68c45d03bc0 (patch)
tree627db3c8b3635513a71fecf56a9351ef776bc7f7 /lib/kernel
parentfb0006c937e284cefe5217d4c2a4b45ff7dfb758 (diff)
parentc8f93bbcf1af2e41683f1b23acc2f51e637870b8 (diff)
downloadotp-b5e8344a22b04729db5493f2757ee68c45d03bc0.tar.gz
otp-b5e8344a22b04729db5493f2757ee68c45d03bc0.tar.bz2
otp-b5e8344a22b04729db5493f2757ee68c45d03bc0.zip
Merge branch 'siri/erl_prim_loader/normalize-and-backslash/OTP-11170' into maint
* siri/erl_prim_loader/normalize-and-backslash/OTP-11170: Update preloaded Fix bug with backslash in erl_prim_loader:normalize/1
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/test/erl_prim_loader_SUITE.erl27
1 files changed, 24 insertions, 3 deletions
diff --git a/lib/kernel/test/erl_prim_loader_SUITE.erl b/lib/kernel/test/erl_prim_loader_SUITE.erl
index 35502a1d27..b2ca3bdbc2 100644
--- a/lib/kernel/test/erl_prim_loader_SUITE.erl
+++ b/lib/kernel/test/erl_prim_loader_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. 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
@@ -24,7 +24,7 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2]).
--export([get_path/1, set_path/1, get_file/1,
+-export([get_path/1, set_path/1, get_file/1, normalize_and_backslash/1,
inet_existing/1, inet_coming_up/1, inet_disconnects/1,
multiple_slaves/1, file_requests/1,
local_archive/1, remote_archive/1,
@@ -39,7 +39,8 @@
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [get_path, set_path, get_file, inet_existing,
+ [get_path, set_path, get_file,
+ normalize_and_backslash, inet_existing,
inet_coming_up, inet_disconnects, multiple_slaves,
file_requests, local_archive, remote_archive,
primary_archive, virtual_dir_in_archive].
@@ -107,6 +108,26 @@ get_file(Config) when is_list(Config) ->
?line error = erl_prim_loader:get_file({dummy}),
ok.
+normalize_and_backslash(Config) ->
+ %% Test OTP-11170
+ case os:type() of
+ {win32,_} ->
+ {skip, "not on windows"};
+ _ ->
+ test_normalize_and_backslash(Config)
+ end.
+test_normalize_and_backslash(Config) ->
+ PrivDir = ?config(priv_dir,Config),
+ Dir = filename:join(PrivDir,"\\"),
+ File = filename:join(Dir,"file-OTP-11170"),
+ ok = file:make_dir(Dir),
+ ok = file:write_file(File,"a file to test OTP-11170"),
+ {ok,["file-OTP-11170"]} = file:list_dir(Dir),
+ {ok,["file-OTP-11170"]} = erl_prim_loader:list_dir(Dir),
+ ok = file:delete(File),
+ ok = file:del_dir(Dir),
+ ok.
+
inet_existing(doc) -> ["Start a node using the 'inet' loading method, ",
"from an already started boot server."];
inet_existing(Config) when is_list(Config) ->