소스 검색

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`
pull/1430/head
alisdair sullivan 8 년 전
부모
커밋
d6a34f9d68
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      src/rebar_prv_eunit.erl

+ 2
- 2
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

불러오는 중...
취소
저장