summaryrefslogtreecommitdiff
path: root/inttest/thooks/thooks_rt.erl
diff options
context:
space:
mode:
Diffstat (limited to 'inttest/thooks/thooks_rt.erl')
-rw-r--r--inttest/thooks/thooks_rt.erl15
1 files changed, 12 insertions, 3 deletions
diff --git a/inttest/thooks/thooks_rt.erl b/inttest/thooks/thooks_rt.erl
index 3cca6bb..f1e7fa4 100644
--- a/inttest/thooks/thooks_rt.erl
+++ b/inttest/thooks/thooks_rt.erl
@@ -5,14 +5,17 @@
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
+setup([Target]) ->
+ retest_utils:load_module(filename:join(Target, "inttest_utils.erl")),
+ ok.
+
files() ->
[
%% dummy lfe files
- {copy, "../../rebar", "rebar"},
{copy, "rebar.config", "rebar.config"},
{copy, "fish.erl", "src/fish.erl"},
{create, "ebin/fish.app", app(fish, [fish])}
- ].
+ ] ++ inttest_utils:rebar_setup().
run(_Dir) ->
?assertMatch({ok, _}, retest_sh:run("./rebar -v clean compile", [])),
@@ -27,7 +30,13 @@ ensure_command_ran_only_once(Command) ->
?assert(filelib:is_regular(File)),
%% ensure that this command only ran once (not for each module)
{ok, Content} = file:read_file(File),
- ?assertEqual(Command ++ "\n", binary_to_list(Content)).
+ %% echo behaves differently in windows and unix
+ case os:type() of
+ {win32, nt} ->
+ ?assertEqual(Command ++ " \r\n", binary_to_list(Content));
+ _ ->
+ ?assertEqual(Command ++ "\n", binary_to_list(Content))
+ end.
%%
%% Generate the contents of a simple .app file