diff options
author | alisdair sullivan <alisdairsullivan@yahoo.ca> | 2016-12-22 00:48:49 -0800 |
---|---|---|
committer | alisdair sullivan <alisdairsullivan@yahoo.ca> | 2016-12-22 00:48:49 -0800 |
commit | d6a34f9d68b962205170c78dd1ef7b97f8475180 (patch) | |
tree | bd66b698c615c6445b212f8a65bfaea8085434b9 /src | |
parent | 001933f2ab65205a8cde9cd44e5163f9fbb94096 (diff) |
don't filter eunit test modules based on file extension
stops the eunit provider from filtering out test modules based on the
file extension. previously, it was hardcoded to expect all test files
ended in `.erl`. this change allows for endings like `.lfe` and `.beam`
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_prv_eunit.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rebar_prv_eunit.erl b/src/rebar_prv_eunit.erl index a9db12e..f65f700 100644 --- a/src/rebar_prv_eunit.erl +++ b/src/rebar_prv_eunit.erl @@ -198,8 +198,8 @@ dedupe_tests({AppMods, TestMods}) -> %% for each modules in TestMods create a test if there is not a module %% in AppMods that will trigger it F = fun(Mod) -> - M = filename:basename(Mod, ".erl"), - MatchesTest = fun(Dir) -> filename:basename(Dir, ".erl") ++ "_tests" == M end, + M = filename:rootname(filename:basename(Mod)), + MatchesTest = fun(Dir) -> filename:rootname(filename:basename(Dir)) ++ "_tests" == M end, case lists:any(MatchesTest, AppMods) of false -> {true, {module, list_to_atom(M)}}; true -> false |