diff options
author | John Högberg <[email protected]> | 2019-08-06 15:52:16 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2019-08-07 08:24:49 +0200 |
commit | 6a9db8b37b8f5a587ffc7622a097bf9c2f6af3e0 (patch) | |
tree | 14a4877008e5ce5fa0633c650be58fc820b602c5 /erts/emulator/test | |
parent | 381ff386961aa28abaf2b43572303bd394121a7d (diff) | |
download | otp-6a9db8b37b8f5a587ffc7622a097bf9c2f6af3e0.tar.gz otp-6a9db8b37b8f5a587ffc7622a097bf9c2f6af3e0.tar.bz2 otp-6a9db8b37b8f5a587ffc7622a097bf9c2f6af3e0.zip |
erts: Escape atoms in erlang:fun_to_list/1
Diffstat (limited to 'erts/emulator/test')
-rw-r--r-- | erts/emulator/test/fun_SUITE.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/erts/emulator/test/fun_SUITE.erl b/erts/emulator/test/fun_SUITE.erl index 2cbde621ce..ad8ef0feff 100644 --- a/erts/emulator/test/fun_SUITE.erl +++ b/erts/emulator/test/fun_SUITE.erl @@ -27,7 +27,7 @@ fun_to_port/1,t_phash/1,t_phash2/1,md5/1, refc/1,refc_ets/1,refc_dist/1, const_propagation/1,t_arity/1,t_is_function2/1, - t_fun_info/1,t_fun_info_mfa/1]). + t_fun_info/1,t_fun_info_mfa/1,t_fun_to_list/1]). -export([nothing/0]). @@ -44,7 +44,7 @@ all() -> equality, ordering, fun_to_port, t_phash, t_phash2, md5, refc, refc_ets, refc_dist, const_propagation, t_arity, t_is_function2, t_fun_info, - t_fun_info_mfa]. + t_fun_info_mfa,t_fun_to_list]. %% Test that the correct EXIT code is returned for all types of bad funs. bad_apply(Config) when is_list(Config) -> @@ -802,6 +802,12 @@ t_fun_info_mfa(Config) when is_list(Config) -> {'EXIT',_} = (catch erlang:fun_info_mfa(id(d))), ok. +t_fun_to_list(Config) when is_list(Config) -> + "fun a:b/1" = erlang:fun_to_list(fun a:b/1), + "fun 'a-esc':'b-esc'/1" = erlang:fun_to_list(fun 'a-esc':'b-esc'/1), + "fun 'a-esc':b/1" = erlang:fun_to_list(fun 'a-esc':b/1), + "fun a:'b-esc'/1" = erlang:fun_to_list(fun a:'b-esc'/1), + ok. bad_info(Term) -> try erlang:fun_info(Term, module) of |