aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/code_SUITE_data
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-12-06 16:22:47 +0100
committerBjörn Gustavsson <[email protected]>2011-12-07 07:29:29 +0100
commita249d7eac995668788702f275ca682e653bbbc69 (patch)
tree7ad00def0499531358beeec61aaf5cb6a05c1a12 /erts/emulator/test/code_SUITE_data
parenta02e9fc9be7ceea4185bd7b1b74cdd9922d4ce4e (diff)
downloadotp-a249d7eac995668788702f275ca682e653bbbc69.tar.gz
otp-a249d7eac995668788702f275ca682e653bbbc69.tar.bz2
otp-a249d7eac995668788702f275ca682e653bbbc69.zip
Add code_SUITE:versions/1
We did not have test case that ensures that the loader refuses to load a module if there already exists old code for the module.
Diffstat (limited to 'erts/emulator/test/code_SUITE_data')
-rw-r--r--erts/emulator/test/code_SUITE_data/versions.erl33
1 files changed, 33 insertions, 0 deletions
diff --git a/erts/emulator/test/code_SUITE_data/versions.erl b/erts/emulator/test/code_SUITE_data/versions.erl
new file mode 100644
index 0000000000..7a6fd8847d
--- /dev/null
+++ b/erts/emulator/test/code_SUITE_data/versions.erl
@@ -0,0 +1,33 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(versions).
+-export([loop/0,version/0]).
+
+loop() ->
+ receive
+ {Pid,version} ->
+ Pid ! {self(),version,version()},
+ loop();
+ done ->
+ ok
+ end.
+
+version() ->
+ ?VERSION.