aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-01-12 16:43:55 +0100
committerHans Bolinder <[email protected]>2018-01-15 08:37:17 +0100
commitff65e1164cc16739c51c456b4e350e966cc2b1ef (patch)
treef23fc8962f6705a4a951923a52aebe167b0eff5e /erts/emulator
parent8fbbc9713e86b51295835f4b5065769c4ca407ef (diff)
downloadotp-ff65e1164cc16739c51c456b4e350e966cc2b1ef.tar.gz
otp-ff65e1164cc16739c51c456b4e350e966cc2b1ef.tar.bz2
otp-ff65e1164cc16739c51c456b4e350e966cc2b1ef.zip
stdlib: Handle Unicode when formatting stacktraces
See also ERL-553 and ERL-544 (commit c3ddb0f).
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/test/code_SUITE.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/erts/emulator/test/code_SUITE.erl b/erts/emulator/test/code_SUITE.erl
index fcef070f08..661a2ee6c9 100644
--- a/erts/emulator/test/code_SUITE.erl
+++ b/erts/emulator/test/code_SUITE.erl
@@ -951,9 +951,14 @@ erl_544(Config) when is_list(Config) ->
receive Go -> ok end,
Res2 = process_info(Tester, current_stacktrace),
io:format("~p~n", [Res2]),
- {current_stacktrace,
- [{Mod, wait, 2, Info2}|_]} = Res2,
+ {current_stacktrace, Stack} = Res2,
+ [{Mod, wait, 2, Info2}|_] = Stack,
File = proplists:get_value(file, Info2),
+ StackFun = fun(_, _, _) -> false end,
+ FormatFun = fun (Term, _) -> io_lib:format("~tp", [Term]) end,
+ Formated =
+ lib:format_stacktrace(1, Stack, StackFun, FormatFun),
+ true = is_list(Formated),
ok
after
ok = file:set_cwd(CWD)