diff options
author | Patrik Nyblom <[email protected]> | 2010-12-03 13:16:21 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-12-03 13:16:21 +0100 |
commit | 159d79b6657e5bb4f3accb6a0d74b74f06da4ba2 (patch) | |
tree | 2e86c92a66ab581e15c577f99bd8225144b6a05b /lib/stdlib/test/filelib_SUITE.erl | |
parent | 6ea8348174c62812057dd552d0890b2d9d4a3c16 (diff) | |
download | otp-159d79b6657e5bb4f3accb6a0d74b74f06da4ba2.tar.gz otp-159d79b6657e5bb4f3accb6a0d74b74f06da4ba2.tar.bz2 otp-159d79b6657e5bb4f3accb6a0d74b74f06da4ba2.zip |
Test and correct filelib and filename
Diffstat (limited to 'lib/stdlib/test/filelib_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/filelib_SUITE.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/stdlib/test/filelib_SUITE.erl b/lib/stdlib/test/filelib_SUITE.erl index d54741051f..5a279609c6 100644 --- a/lib/stdlib/test/filelib_SUITE.erl +++ b/lib/stdlib/test/filelib_SUITE.erl @@ -53,8 +53,11 @@ wildcard_one(Config) when is_list(Config) -> wildcard_two(Config) when is_list(Config) -> ?line Dir = filename:join(?config(priv_dir, Config), "wildcard_two"), + ?line DirB = unicode:characters_to_binary(Dir, file:native_name_encoding()), ?line ok = file:make_dir(Dir), - ?line do_wildcard_1(Dir, fun(Wc) -> filelib:wildcard(Wc, Dir) end), + ?line do_wildcard_1(Dir, fun(Wc) -> io:format("~p~n",[{Wc,Dir, X = filelib:wildcard(Wc, Dir)}]),X end), + ?line do_wildcard_1(Dir, fun(Wc) -> io:format("~p~n",[{Wc,DirB, X = filelib:wildcard(Wc, DirB)}]), + [unicode:characters_to_list(Y,file:native_name_encoding()) || Y <- X] end), ?line do_wildcard_1(Dir, fun(Wc) -> filelib:wildcard(Wc, Dir++"/") end), case os:type() of {win32,_} -> @@ -253,5 +256,7 @@ ensure_dir_eexist(Config) when is_list(Config) -> %% There already is a file with the name of the directory %% we want to create. ?line NeedFile = filename:join(Name, "file"), + ?line NeedFileB = filename:join(Name, <<"file">>), ?line {error, eexist} = filelib:ensure_dir(NeedFile), + ?line {error, eexist} = filelib:ensure_dir(NeedFileB), ok. |