From 64a697339414f424073c5b021285fddb0ff2d9da Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Wed, 10 Feb 2010 15:47:09 +0000 Subject: OTP-8418 user.erl (used in oldshell) is updated to handle unicode in prompt strings (io:get_line/{1,2}). io_lib is also updated to format prompts with the 't' modifier (i.e. ~ts instead of ~s). --- lib/stdlib/test/shell_SUITE.erl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'lib/stdlib/test/shell_SUITE.erl') diff --git a/lib/stdlib/test/shell_SUITE.erl b/lib/stdlib/test/shell_SUITE.erl index da73046c2a..588342d46a 100644 --- a/lib/stdlib/test/shell_SUITE.erl +++ b/lib/stdlib/test/shell_SUITE.erl @@ -34,7 +34,8 @@ start_restricted_on_command_line/1,restricted_local/1]). %% Internal export. --export([otp_5435_2/0, prompt1/1, prompt2/1, prompt3/1, prompt4/1]). +-export([otp_5435_2/0, prompt1/1, prompt2/1, prompt3/1, prompt4/1, + prompt5/1]). %% %% Define to run outside of test server @@ -2618,6 +2619,16 @@ otp_8393(Config) when is_list(Config) -> ?line "default\nl.\n" = t(<<"shell:prompt_func({shell_SUITE,prompt3}). l.">>), + %% + %% Although this tests that you can set a unicode prompt function + %% it does not really test that it does work with the io-servers. + %% That is instead tested in the io_proto_SUITE, which has + %% the right infrastructure in place for such tests. /PaN + %% + ?line _ = shell:prompt_func(default), + ?line "default\nl.\n" = + t(<<"shell:prompt_func({shell_SUITE,prompt5}). l.">>), + %% Restricted shell. Contents = <<"-module(test_restricted_shell). -export([local_allowed/3, non_local_allowed/3]). @@ -2672,6 +2683,9 @@ prompt3(L) -> prompt4(_L) -> erlang:apply({erlang,'/'}, [1,0]). +prompt5(_L) -> + [1050,1072,1082,1074,1086,32,1077,32,85,110,105,99,111,100,101,32,63]. + -ifdef(not_used). exit_term(B) -> "** exception exit:" ++ Reply = t(B), -- cgit v1.2.3