diff options
author | Viacheslav V. Kovalev <kovyl2404@gmail.com> | 2015-04-21 22:26:20 +0300 |
---|---|---|
committer | Viacheslav Kovalev <kovyl2404@gmail.com> | 2015-04-22 11:16:38 +0300 |
commit | 83d738a829fae4547776c87c3c4689cf17e69541 (patch) | |
tree | 390ff27d84056ac31b47e2c903d99b121a73ed95 /test/rebar_utils_SUITE.erl | |
parent | 381c6f4779a93b50308f2cc86de8a19b23ebcee5 (diff) |
Implement some test on profiles deduplication
Diffstat (limited to 'test/rebar_utils_SUITE.erl')
-rw-r--r-- | test/rebar_utils_SUITE.erl | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/test/rebar_utils_SUITE.erl b/test/rebar_utils_SUITE.erl index e9b32e2..9b7bca1 100644 --- a/test/rebar_utils_SUITE.erl +++ b/test/rebar_utils_SUITE.erl @@ -21,7 +21,9 @@ task_with_flag_with_trailing_comma/1, task_with_flag_with_commas/1, task_with_multiple_flags/1, - special_task_do/1]). + special_task_do/1, + trivial_umerge/1, + three_tuple_umerge/1]). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). @@ -29,7 +31,10 @@ all() -> - [{group, args_to_tasks}]. + [{group, args_to_tasks}, + trivial_umerge, + three_tuple_umerge + ]. groups() -> [{args_to_tasks, [], [empty_arglist, @@ -118,3 +123,18 @@ special_task_do(_Config) -> "do", "bar,", "baz"]). + +trivial_umerge(_Config) -> + New = [{key, foo}], + Old = [{key, bar}], + Result = rebar_utils:tup_umerge(New, Old), + ?assertEqual([{key, foo}], Result). + +three_tuple_umerge(_Config) -> + New = rebar_utils:tup_sort([{d, foo, true}, {d, bar, true}]), + Old = rebar_utils:tup_sort([{d, foo, false}, {d, bar, true}]), + Result = rebar_utils:tup_umerge(New, Old), + ?assertEqual( + rebar_utils:tup_sort([{do, foo, true}, {d, bar, true}]), + Result + ). |