diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-06-10 15:17:50 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-06-10 15:56:56 +0200 |
commit | b135c712271a30b96278c68e2fdaf8635e88926d (patch) | |
tree | ebc97a6f48038e1c6790e6f792b167878a726446 /erts/emulator/test | |
parent | 20c59a72536521f6c4ffea9e86fe931b6f8ec9ff (diff) | |
download | otp-b135c712271a30b96278c68e2fdaf8635e88926d.tar.gz otp-b135c712271a30b96278c68e2fdaf8635e88926d.tar.bz2 otp-b135c712271a30b96278c68e2fdaf8635e88926d.zip |
erts: Add test for module_info on purged modules
Diffstat (limited to 'erts/emulator/test')
-rw-r--r-- | erts/emulator/test/module_info_SUITE.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/erts/emulator/test/module_info_SUITE.erl b/erts/emulator/test/module_info_SUITE.erl index f55755f0f9..25ba6d1787 100644 --- a/erts/emulator/test/module_info_SUITE.erl +++ b/erts/emulator/test/module_info_SUITE.erl @@ -101,7 +101,15 @@ deleted(Config) when is_list(Config) -> 17 = module_info_test:f(), [_|_] = erlang:get_module_info(module_info_test, attributes), [_|_] = erlang:get_module_info(module_info_test), - erlang:delete_module(module_info_test), + + %% first delete it + true = erlang:delete_module(module_info_test), + {'EXIT',{undef, _}} = (catch module_info_test:f()), + {'EXIT',{badarg, _}} = (catch erlang:get_module_info(module_info_test,attributes)), + {'EXIT',{badarg, _}} = (catch erlang:get_module_info(module_info_test)), + + %% then purge it + true = erlang:purge_module(module_info_test), {'EXIT',{undef, _}} = (catch module_info_test:f()), {'EXIT',{badarg, _}} = (catch erlang:get_module_info(module_info_test,attributes)), {'EXIT',{badarg, _}} = (catch erlang:get_module_info(module_info_test)), |