aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src/test_server_io.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-01-15 19:00:27 +0100
committerSiri Hansen <[email protected]>2013-01-25 15:55:59 +0100
commite084233e56b43a47aa08cd3564124a25b8bfd2fb (patch)
tree5f64f553671f90e8a4a6aea9c9440c1b22af0dc4 /lib/test_server/src/test_server_io.erl
parent6025471459d7e80ab05118b9ec9f7cb0fe0668a1 (diff)
downloadotp-e084233e56b43a47aa08cd3564124a25b8bfd2fb.tar.gz
otp-e084233e56b43a47aa08cd3564124a25b8bfd2fb.tar.bz2
otp-e084233e56b43a47aa08cd3564124a25b8bfd2fb.zip
[test_server] Update test_server to handle unicode
* Use UTF-8 encoding for all HTML files, except the HTML version of the test suite generated with erl2html2:convert, which will have the same encoding as the original test suite (.erl) file. * Encode link targets in HTML files, allowing both special characters like "/", "&", "?" etc, and latin1 or unicode characters. * Use unicode modifier 't' with ~s and ~p when appropriate. * Use unicode:characters_to_list and unicode:characters_to_binary for conversion between binaries and strings instead of binary_to_list and list_to_binary.
Diffstat (limited to 'lib/test_server/src/test_server_io.erl')
-rw-r--r--lib/test_server/src/test_server_io.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/test_server/src/test_server_io.erl b/lib/test_server/src/test_server_io.erl
index 777b377201..662ee11515 100644
--- a/lib/test_server/src/test_server_io.erl
+++ b/lib/test_server/src/test_server_io.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2012. All Rights Reserved.
+%% Copyright Ericsson AB 2012-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
@@ -235,7 +235,7 @@ handle_info(kill_group_leaders, #st{gls=Gls,stopping=From}=St) ->
gen_server:reply(From, ok),
{stop,normal,St};
handle_info(Other, St) ->
- io:format("Ignoring: ~p\n", [Other]),
+ io:format("Ignoring: ~tp\n", [Other]),
{noreply,St}.
terminate(_, _) ->
@@ -256,12 +256,12 @@ output(From, Tag, Str, #st{io_buffering=Buffered,buffered=Buf0}=St) ->
do_output(stdout, Str, #st{job_name=undefined}) ->
io:put_chars(Str);
do_output(stdout, Str0, #st{job_name=Name}) ->
- Str = io_lib:format("Testing ~s: ~s\n", [Name,Str0]),
+ Str = io_lib:format("Testing ~ts: ~ts\n", [Name,Str0]),
io:put_chars(Str);
do_output(Tag, Str, #st{fds=Fds}=St) ->
case gb_trees:lookup(Tag, Fds) of
none ->
- S = io_lib:format("\n*** ERROR: ~p, line ~p: No known '~p' log file\n",
+ S = io_lib:format("\n*** ERROR: ~w, line ~w: No known '~tp' log file\n",
[?MODULE,?LINE,Tag]),
do_output(stdout, [S,Str], St);
{value,Fd} ->
@@ -272,8 +272,8 @@ do_output(Tag, Str, #st{fds=Fds}=St) ->
_ -> ok
end
catch _:Error ->
- S = io_lib:format("\n*** ERROR: ~p, line ~p: Error writing to "
- "log file '~p': ~p\n",
+ S = io_lib:format("\n*** ERROR: ~w, line ~w: Error writing to "
+ "log file '~tp': ~tp\n",
[?MODULE,?LINE,Tag,Error]),
do_output(stdout, [S,Str], St)
end