From cf83eb7fc45fac677a83b5f38e87c581cf516cf2 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Wed, 27 Sep 2017 19:01:44 -0400 Subject: Corrects a fix to src_dir values The previous patch at #7c959cc fixed the usage of duplicate values for directories through relative paths, but mistakenly went overboard and dropped the `./` path, which is still fairly common. Similarly for `../". The code is modified to special-case such values and keep the code working. --- test/rebar_dir_SUITE.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/rebar_dir_SUITE.erl b/test/rebar_dir_SUITE.erl index 3b8e1fc..4743865 100644 --- a/test/rebar_dir_SUITE.erl +++ b/test/rebar_dir_SUITE.erl @@ -68,10 +68,11 @@ default_all_src_dirs(Config) -> ["src", "test"] = rebar_dir:all_src_dirs(rebar_state:opts(State), ["src"], ["test"]). src_dirs(Config) -> - RebarConfig = [{erl_opts, [{src_dirs, ["foo", "./bar", "bar", "bar/", "./bar/", "baz"]}]}], + RebarConfig = [{erl_opts, [{src_dirs, ["foo", "./bar", "bar", "bar/", "./bar/", "baz", + "./", ".", "../", "..", "./../", "../.", ".././../"]}]}], {ok, State} = rebar_test_utils:run_and_check(Config, RebarConfig, ["compile"], return), - ["bar", "baz", "foo"] = rebar_dir:src_dirs(rebar_state:opts(State)). + [".", "..", "../..", "bar", "baz", "foo"] = rebar_dir:src_dirs(rebar_state:opts(State)). src_dirs_with_opts(Config) -> RebarConfig = [{erl_opts, [{src_dirs, ["foo", "bar", "baz"]}, -- cgit v1.1