aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-08-06 10:23:12 +0200
committerBjörn Gustavsson <[email protected]>2012-08-06 10:23:12 +0200
commitc552578844dd616bb49727e53df02f0aab5f3719 (patch)
tree6d0e41f30da50a70208347ca12590929276eab89 /lib
parentafb19a88ab89ae0b45e28555eee2a03d8215b1b1 (diff)
parent85a5f71087785c4eada6a4101ffeef6a15f5c409 (diff)
downloadotp-c552578844dd616bb49727e53df02f0aab5f3719.tar.gz
otp-c552578844dd616bb49727e53df02f0aab5f3719.tar.bz2
otp-c552578844dd616bb49727e53df02f0aab5f3719.zip
Merge branch 'maint'
* maint: compile_SUITE: Correct the forms_2 test case to work on Windows
Diffstat (limited to 'lib')
-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),