diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-05-04 00:47:53 +0000 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-05-04 00:47:53 +0000 |
commit | 681c8f718971307c267216547ccf859e784a673b (patch) | |
tree | 691a84f6174862fc9fae5995fb751f16d0e6c9cb | |
parent | 5920ee29bef1462434e419ceee1342a614e6f063 (diff) |
Adding directory path test for deduplication
-rw-r--r-- | test/rebar_profiles_SUITE.erl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/rebar_profiles_SUITE.erl b/test/rebar_profiles_SUITE.erl index 4154661..b42df39 100644 --- a/test/rebar_profiles_SUITE.erl +++ b/test/rebar_profiles_SUITE.erl @@ -16,6 +16,7 @@ add_to_profile/1, add_to_existing_profile/1, profiles_remain_applied_with_config_present/1, + deduplicated_paths/1, test_profile_applied_at_completion/1, test_profile_applied_before_compile/1, test_profile_applied_before_eunit/1, @@ -31,6 +32,7 @@ all() -> same_profile_deduplication, stack_deduplication, add_to_profile, add_to_existing_profile, profiles_remain_applied_with_config_present, + deduplicated_paths, test_profile_applied_at_completion, test_profile_applied_before_compile, test_profile_applied_before_eunit, @@ -337,6 +339,22 @@ profiles_remain_applied_with_config_present(Config) -> true = lists:member({d, not_ok}, proplists:get_value(options, Mod:module_info(compile), [])). +deduplicated_paths(Config) -> + AppDir = ?config(apps, Config), + + Name = rebar_test_utils:create_random_name("deduplicated_paths_"), + Vsn = rebar_test_utils:create_random_vsn(), + rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]), + + RebarConfig = [], + rebar_test_utils:create_config(AppDir, RebarConfig), + rebar_test_utils:run_and_check(Config, RebarConfig, + ["as", "a,b,c,d,e,a,e,b", "compile"], + {ok, [{app, Name}]}), + + Path = filename:join([AppDir, "_build", "c+d+a+e+b", "lib", Name, "ebin"]), + ?assert(filelib:is_dir(Path)). + test_profile_applied_at_completion(Config) -> AppDir = ?config(apps, Config), |