From d1d834820ddaba4fa31e6ab6d07a96ac7cc6d999 Mon Sep 17 00:00:00 2001 From: serge Date: Thu, 10 Jan 2013 09:07:38 -0500 Subject: Add application:get_key/3 The new function provides a default value for a configuration parameter. --- lib/kernel/test/application_SUITE.erl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lib/kernel/test/application_SUITE.erl') diff --git a/lib/kernel/test/application_SUITE.erl b/lib/kernel/test/application_SUITE.erl index f469a0af98..412a969b13 100644 --- a/lib/kernel/test/application_SUITE.erl +++ b/lib/kernel/test/application_SUITE.erl @@ -27,7 +27,7 @@ otp_1586/1, otp_2078/1, otp_2012/1, otp_2718/1, otp_2973/1, otp_3002/1, otp_3184/1, otp_4066/1, otp_4227/1, otp_5363/1, otp_5606/1, - start_phases/1, get_key/1, + start_phases/1, get_key/1, get_env/1, permit_false_start_local/1, permit_false_start_dist/1, script_start/1, nodedown_start/1, init2973/0, loop2973/0, loop5606/1]). @@ -49,7 +49,7 @@ all() -> [failover, failover_comp, permissions, load, load_use_cache, {group, reported_bugs}, start_phases, script_start, nodedown_start, permit_false_start_local, - permit_false_start_dist, get_key, + permit_false_start_dist, get_key, get_env, {group, distr_changed}, config_change, shutdown_func, shutdown_timeout]. groups() -> @@ -1503,6 +1503,15 @@ loop5606(Pid) -> Pid ! {self(), Res} end. +get_env(suite) -> []; +get_env(doc) -> + ["Tests get_env/* functions"]; +get_env(Conf) when is_list(Conf) -> + ?line {ok, _} = application:get_env(kernel, error_logger), + ?line undefined = application:get_env(undefined_app, a), + ?line undefined = application:get_env(kernel, error_logger_xyz), + ?line default = application:get_env(kernel, error_logger_xyz, default), + ok. %%----------------------------------------------------------------- %% Should be started in a CC view with: -- cgit v1.2.3 From 719e25ebda24db268cf94121c29258283e24b753 Mon Sep 17 00:00:00 2001 From: Serge Aleynikov Date: Mon, 14 Jan 2013 13:23:04 -0500 Subject: Removed obsolete ?line macro --- lib/kernel/test/application_SUITE.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/kernel/test/application_SUITE.erl') diff --git a/lib/kernel/test/application_SUITE.erl b/lib/kernel/test/application_SUITE.erl index 412a969b13..2ca8840e1f 100644 --- a/lib/kernel/test/application_SUITE.erl +++ b/lib/kernel/test/application_SUITE.erl @@ -1507,10 +1507,10 @@ get_env(suite) -> []; get_env(doc) -> ["Tests get_env/* functions"]; get_env(Conf) when is_list(Conf) -> - ?line {ok, _} = application:get_env(kernel, error_logger), - ?line undefined = application:get_env(undefined_app, a), - ?line undefined = application:get_env(kernel, error_logger_xyz), - ?line default = application:get_env(kernel, error_logger_xyz, default), + {ok, _} = application:get_env(kernel, error_logger), + undefined = application:get_env(undefined_app, a), + undefined = application:get_env(kernel, error_logger_xyz), + default = application:get_env(kernel, error_logger_xyz, default), ok. %%----------------------------------------------------------------- -- cgit v1.2.3