summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2018-04-25 19:31:16 -0400
committerGitHub <noreply@github.com>2018-04-25 19:31:16 -0400
commit7eca59670f43f5298dd9d126911e583eef7edd0f (patch)
treed25f1f9aa15e596f147e69dab428e3d1f828e598 /test
parent35fb67523d784927a291fb464da4b36c6004470c (diff)
parent288d0c7484ba9214cc6598100000bcce0fefe462 (diff)
Merge pull request #1765 from ferd/clear-all-dialyzer-errors
Clear all dialyzer errors
Diffstat (limited to 'test')
-rw-r--r--test/rebar_dir_SUITE.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/rebar_dir_SUITE.erl b/test/rebar_dir_SUITE.erl
index 4743865..0eda5bf 100644
--- a/test/rebar_dir_SUITE.erl
+++ b/test/rebar_dir_SUITE.erl
@@ -5,6 +5,7 @@
-export([default_src_dirs/1, default_extra_src_dirs/1, default_all_src_dirs/1]).
-export([src_dirs/1, src_dirs_with_opts/1, extra_src_dirs/1, all_src_dirs/1]).
-export([src_dir_opts/1, recursive/1]).
+-export([top_src_dirs/1]).
-export([profile_src_dirs/1, profile_extra_src_dirs/1, profile_all_src_dirs/1]).
-export([profile_src_dir_opts/1]).
-export([retarget_path/1, alt_base_dir_abs/1, alt_base_dir_rel/1]).
@@ -18,7 +19,7 @@
all() -> [default_src_dirs, default_extra_src_dirs, default_all_src_dirs,
src_dirs, extra_src_dirs, all_src_dirs, src_dir_opts, recursive,
profile_src_dirs, profile_extra_src_dirs, profile_all_src_dirs,
- profile_src_dir_opts,
+ profile_src_dir_opts, top_src_dirs,
retarget_path, alt_base_dir_abs, alt_base_dir_rel, global_cache_dir,
default_global_cache_dir, overwrite_default_global_cache_dir].
@@ -123,6 +124,15 @@ recursive(Config) ->
ok.
+top_src_dirs(Config) ->
+ %% We can get the same result out of specifying src_dirs from the config root,
+ %% not just the erl_opts
+ RebarConfig = [{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)).
+
profile_src_dirs(Config) ->
RebarConfig = [
{erl_opts, [{src_dirs, ["foo", "bar"]}]},