aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/bif_SUITE.erl
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-08-21 15:25:00 +0200
committerRickard Green <[email protected]>2017-08-23 14:24:38 +0200
commit319eefea3b2097b543751c63cebbb4a92011dbbf (patch)
tree7bef11f08173d416a989eb196966e06f85e17203 /erts/emulator/test/bif_SUITE.erl
parent7c9ea890cd2530bffeafa82abeeee876fd24a6ba (diff)
downloadotp-319eefea3b2097b543751c63cebbb4a92011dbbf.tar.gz
otp-319eefea3b2097b543751c63cebbb4a92011dbbf.tar.bz2
otp-319eefea3b2097b543751c63cebbb4a92011dbbf.zip
Unicode support for erlang:display_string/1
Diffstat (limited to 'erts/emulator/test/bif_SUITE.erl')
-rw-r--r--erts/emulator/test/bif_SUITE.erl26
1 files changed, 24 insertions, 2 deletions
diff --git a/erts/emulator/test/bif_SUITE.erl b/erts/emulator/test/bif_SUITE.erl
index 4908ac410c..2320870a0e 100644
--- a/erts/emulator/test/bif_SUITE.erl
+++ b/erts/emulator/test/bif_SUITE.erl
@@ -24,7 +24,7 @@
-include_lib("kernel/include/file.hrl").
-export([all/0, suite/0,
- display/1, display_huge/0,
+ display/1, display_huge/0, display_string/1,
erl_bif_types/1,guard_bifs_in_erl_bif_types/1,
shadow_comments/1,list_to_utf8_atom/1,
specs/1,improper_bif_stubs/1,auto_imports/1,
@@ -43,7 +43,7 @@ all() ->
[erl_bif_types, guard_bifs_in_erl_bif_types, shadow_comments,
specs, improper_bif_stubs, auto_imports,
t_list_to_existing_atom, os_env, otp_7526,
- display, list_to_utf8_atom,
+ display, display_string, list_to_utf8_atom,
atom_to_binary, binary_to_atom, binary_to_existing_atom,
erl_crash_dump_bytes, min_max, erlang_halt, is_builtin,
error_stacktrace, error_stacktrace_during_call_trace].
@@ -68,6 +68,28 @@ deeep(N,Acc) ->
deeep(N) ->
deeep(N,[hello]).
+display_string(Config) when is_list(Config) ->
+ true = erlang:display_string("hej"),
+ true = erlang:display_string(""),
+ true = erlang:display_string("hopp"),
+ true = erlang:display_string("\n"),
+ true = erlang:display_string(lists:seq(1100,1200)),
+ {error,badarg} = try
+ erlang:display_string(atom),
+ ok
+ catch
+ T0:E0 ->
+ {T0, E0}
+ end,
+ {error,badarg} = try
+ erlang:display_string(make_ref()),
+ ok
+ catch
+ T1:E1 ->
+ {T1, E1}
+ end,
+ ok.
+
erl_bif_types(Config) when is_list(Config) ->
ensure_erl_bif_types_compiled(),