25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Merge pull request #461 from mremond/fix-r16-tests

Test file can be compiled under R16
This commit is contained in:
Mickaël Rémond 2015-03-07 12:41:59 +01:00
commit e3336ad124

View File

@ -53,7 +53,9 @@ undefined_function(Module, Func, Args) ->
run_elixir_test(Func) ->
'Elixir.ExUnit':start([]),
'Elixir.Code':load_file(list_to_binary(filename:join(test_dir(), atom_to_list(Func)))),
#{failures := 0} = 'Elixir.ExUnit':run().
%% I did not use map syntax, so that this file can still be build under R16
ResultMap = 'Elixir.ExUnit':run(),
{ok, 0} = maps:find(failures, ResultMap).
test_dir() ->
{ok, CWD} = file:get_cwd(),