diff options
author | Björn Gustavsson <[email protected]> | 2016-11-18 11:42:39 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-11-18 11:42:39 +0100 |
commit | f578f6c57438ac7dd11a3d113406a104f4064b26 (patch) | |
tree | 280646a4f83df12e2412ffa1bb207fdce881742c /lib/stdlib | |
parent | 041217c80f4880cb9ee3b626cc0339b5eb726b6e (diff) | |
parent | 08f1aa472cb28d148963495244acc7e9cafed3c4 (diff) | |
download | otp-f578f6c57438ac7dd11a3d113406a104f4064b26.tar.gz otp-f578f6c57438ac7dd11a3d113406a104f4064b26.tar.bz2 otp-f578f6c57438ac7dd11a3d113406a104f4064b26.zip |
Merge branch 'maint'
* maint:
Run dialyzer as part of the travis script
Correct tar_SUITE:unicode/1
Diffstat (limited to 'lib/stdlib')
-rw-r--r-- | lib/stdlib/test/tar_SUITE.erl | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/lib/stdlib/test/tar_SUITE.erl b/lib/stdlib/test/tar_SUITE.erl index 64dd41e75a..6f3979bb77 100644 --- a/lib/stdlib/test/tar_SUITE.erl +++ b/lib/stdlib/test/tar_SUITE.erl @@ -720,20 +720,25 @@ memory(Config) when is_list(Config) -> %% Test filenames with characters outside the US ASCII range. unicode(Config) when is_list(Config) -> - PrivDir = proplists:get_value(priv_dir, Config), - do_unicode(PrivDir), + run_unicode_node(Config, "+fnu"), case has_transparent_naming() of true -> - Pa = filename:dirname(code:which(?MODULE)), - Node = start_node(unicode, "+fnl -pa "++Pa), - ok = rpc:call(Node, erlang, apply, - [fun() -> do_unicode(PrivDir) end,[]]), - true = test_server:stop_node(Node), - ok; + run_unicode_node(Config, "+fnl"); false -> ok end. +run_unicode_node(Config, Option) -> + PrivDir = proplists:get_value(priv_dir, Config), + Pa = filename:dirname(code:which(?MODULE)), + Args = Option ++ " -pa "++Pa, + io:format("~s\n", [Args]), + Node = start_node(unicode, Args), + ok = rpc:call(Node, erlang, apply, + [fun() -> do_unicode(PrivDir) end,[]]), + true = test_server:stop_node(Node), + ok. + has_transparent_naming() -> case os:type() of {unix,darwin} -> false; @@ -745,10 +750,11 @@ do_unicode(PrivDir) -> ok = file:set_cwd(PrivDir), ok = file:make_dir("unicöde"), - Names = unicode_create_files(), + Names = lists:sort(unicode_create_files()), Tar = "unicöde.tar", ok = erl_tar:create(Tar, ["unicöde"], []), - {ok,Names} = erl_tar:table(Tar, []), + {ok,Names0} = erl_tar:table(Tar, []), + Names = lists:sort(Names0), _ = [ok = file:delete(Name) || Name <- Names], ok = erl_tar:extract(Tar), _ = [{ok,_} = file:read_file(Name) || Name <- Names], |