anchor.diff:          %% dir is a single directory
           Dir when is_list(Dir), is_integer(hd(Dir)) ->
               NewPath = copy(State, Dir),
  -            [{dir, compile_dir(State, Dir, NewPath)}|lists:keydelete(dir, 1, Opts)];
  +            [{dir, compile_dir(State, NewPath)}|lists:keydelete(dir, 1, Opts)];
           %% dir is a list of directories
           Dirs when is_list(Dirs) ->
               NewDirs = lists:map(fun(Dir) ->
                   NewPath = copy(State, Dir),
  -                compile_dir(State, Dir, NewPath)
  +                compile_dir(State, NewPath)
               end, Dirs),
               [{dir, NewDirs}|lists:keydelete(dir, 1, Opts)]
       end.
  
positive.code: replace_src_dirs(State, Dirs) ->
      %% replace any `src_dirs` with the test dirs
      ErlOpts = rebar_state:get(State, erl_opts, []),
      StrippedOpts = filter_src_dirs(ErlOpts),
      rebar_state:set(State, erl_opts, [{extra_src_dirs, Dirs}|StrippedOpts]).
  
  filter_src_dirs(ErlOpts) ->
      lists:filter(fun({src_dirs, _}) -> false; ({extra_src_dirs, _}) -> false; (_) -> true end, ErlOpts).
  
negative.code:             Target
      end.
  
  compile_dir(State, Dir) ->
      NewState = replace_src_dirs(State, [filename:absname(Dir)]),
      ok = rebar_erlc_compiler:compile(NewState, rebar_dir:base_dir(State), Dir),
      ok = maybe_cover_compile(State, Dir),
      Dir.
  
  retarget_path(State, Path) ->
      ProjectApps = rebar_state:project_apps(State),
  