From 048400b08872d95ce7a8b48e346b49971acb6506 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Wed, 28 Aug 2013 14:05:08 +0200 Subject: Fix testing with unicode paths re needs unicode option --- lib/stdlib/test/shell_SUITE.erl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/stdlib') diff --git a/lib/stdlib/test/shell_SUITE.erl b/lib/stdlib/test/shell_SUITE.erl index 233ba0764f..692dfe0faa 100644 --- a/lib/stdlib/test/shell_SUITE.erl +++ b/lib/stdlib/test/shell_SUITE.erl @@ -146,7 +146,7 @@ start_restricted_from_shell(Config) when is_list(Config) -> "test_restricted) end.">>), ?line {ok, test_restricted} = application:get_env(stdlib, restricted_shell), - ?line "Module" ++ _ = t(<<"begin m() end.">>), + ?line "Module" ++ _ = t({<<"begin m() end.">>, utf8}), ?line "exception exit: restricted shell does not allow c(foo)" = comm_err(<<"begin c(foo) end.">>), ?line "exception exit: restricted shell does not allow init:stop()" = @@ -225,7 +225,7 @@ start_restricted_on_command_line(Config) when is_list(Config) -> ?line {ok,Node2} = start_node(shell_suite_helper_2, "-pa "++?config(priv_dir,Config)++ " -stdlib restricted_shell test_restricted2"), - ?line "Module" ++ _ = t({Node2,<<"begin m() end.">>}), + ?line "Module" ++ _ = t({Node2,<<"begin m() end.">>, utf8}), ?line "exception exit: restricted shell does not allow c(foo)" = comm_err({Node2,<<"begin c(foo) end.">>}), ?line "exception exit: restricted shell does not allow init:stop()" = @@ -2927,14 +2927,14 @@ t1(Parent, {Bin,Enc}, F) -> server_loop(S) catch exit:R -> Parent ! {self(), R}; throw:{?MODULE,LoopReply,latin1} -> - L0 = binary_to_list(list_to_binary(LoopReply)), - [$\n | L1] = lists:dropwhile(fun(X) -> X =/= $\n end, L0), - Parent ! {self(), dotify(L1)}; + L0 = binary_to_list(list_to_binary(LoopReply)), + [$\n | L1] = lists:dropwhile(fun(X) -> X =/= $\n end, L0), + Parent ! {self(), dotify(L1)}; throw:{?MODULE,LoopReply,_Uni} -> - Tmp = unicode:characters_to_binary(LoopReply), - L0 = unicode:characters_to_list(Tmp), - [$\n | L1] = lists:dropwhile(fun(X) -> X =/= $\n end, L0), - Parent ! {self(), dotify(L1)} + Tmp = unicode:characters_to_binary(LoopReply), + L0 = unicode:characters_to_list(Tmp), + [$\n | L1] = lists:dropwhile(fun(X) -> X =/= $\n end, L0), + Parent ! {self(), dotify(L1)} after group_leader(S#state.leader, self()) end. -- cgit v1.2.3 From 39c0803372e168dc4841ca640072eac2dd088e41 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 30 Aug 2013 12:09:07 +0200 Subject: stdlib: Fix format if module resides in a unicode directory --- lib/stdlib/src/c.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/stdlib') diff --git a/lib/stdlib/src/c.erl b/lib/stdlib/src/c.erl index fb6b8c8661..30140e20af 100644 --- a/lib/stdlib/src/c.erl +++ b/lib/stdlib/src/c.erl @@ -450,7 +450,7 @@ m() -> foreach(fun ({Mod,File}) -> mformat(Mod, File) end, sort(code:all_loaded())). mformat(A1, A2) -> - format("~-20s ~s\n", [A1,A2]). + format("~-20s ~ts\n", [A1,A2]). %% erlangrc(Home) %% Try to run a ".erlang" file, first in the current directory @@ -716,7 +716,7 @@ ls(Dir) -> {error, enotdir} -> ls_print([Dir]); {error, Error} -> - format("~s\n", [file:format_error(Error)]) + format("~ts\n", [file:format_error(Error)]) end. ls_print([]) -> ok; -- cgit v1.2.3