aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/compile_SUITE.erl30
1 files changed, 17 insertions, 13 deletions
diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl
index 0dfa18490a..9dbfb5883b 100644
--- a/lib/compiler/test/compile_SUITE.erl
+++ b/lib/compiler/test/compile_SUITE.erl
@@ -106,19 +106,23 @@ file_1(Config) when is_list(Config) ->
ok.
forms_2(Config) when is_list(Config) ->
- {ok, simple, Binary} = compile:forms([{attribute,1,module,simple}], [binary, {source,"/foo/bar"}]),
- code:load_binary(simple, "/foo/bar", Binary),
- Info = simple:module_info(compile),
-
- %% Test proper source is returned.
- "/foo/bar" = proplists:get_value(source, Info),
- %% Ensure options is not polluted with the source.
- [] = proplists:get_value(options, Info),
-
- %% Cleanup.
- true = code:delete(simple),
- false = code:purge(simple),
- ok.
+ Src = "/foo/bar",
+ AbsSrc = filename:absname(Src),
+ {ok,simple,Binary} = compile:forms([{attribute,1,module,simple}],
+ [binary,{source,Src}]),
+ code:load_binary(simple, Src, Binary),
+ Info = simple:module_info(compile),
+
+ %% Test that the proper source is returned.
+ AbsSrc = proplists:get_value(source, Info),
+
+ %% Ensure that the options are not polluted with 'source'.
+ [] = proplists:get_value(options, Info),
+
+ %% Cleanup.
+ true = code:delete(simple),
+ false = code:purge(simple),
+ ok.
module_mismatch(Config) when is_list(Config) ->
?line DataDir = ?config(data_dir, Config),