summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-03-02 09:31:21 -0500
committerFred Hebert <mononcqc@ferd.ca>2015-03-02 09:31:21 -0500
commit03f542d0dd3df45944967aceb333f585e9b63a16 (patch)
tree000804e06a711f99e3e2400f5cfaf062b0907b34 /test
parent71d70fca1f1182b8f4919e2b3f5a7ff277700271 (diff)
parent80f276e5e51379b6aae59f99474d25da68f0227a (diff)
Merge pull request #199 from tsloughter/empty_list_profile_merge
don't replace non-string list with empty list in profile merge
Diffstat (limited to 'test')
-rw-r--r--test/rebar_profiles_SUITE.erl12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/rebar_profiles_SUITE.erl b/test/rebar_profiles_SUITE.erl
index 0b378cb..03a8090 100644
--- a/test/rebar_profiles_SUITE.erl
+++ b/test/rebar_profiles_SUITE.erl
@@ -85,10 +85,14 @@ profile_merge_keys(Config) ->
profile_merges(_Config) ->
RebarConfig = [{test1, [{key1, 1, 2}, key2]},
{test2, "hello"},
+ {test3, [key3]},
+ {test4, "oldvalue"},
{profiles,
[{profile1,
[{test1, [{key3, 5}, key1]}]},
- {profile2, [{test2, "goodbye"}]}]}],
+ {profile2, [{test2, "goodbye"},
+ {test3, []},
+ {test4, []}]}]}],
State = rebar_state:new(RebarConfig),
State1 = rebar_state:apply_profiles(State, [profile1, profile2]),
@@ -97,4 +101,8 @@ profile_merges(_Config) ->
lists:sort(rebar_state:get(State1, test1))),
%% Use new value for strings
- "goodbye" = rebar_state:get(State1, test2).
+ "goodbye" = rebar_state:get(State1, test2),
+
+ %% Check that a newvalue of []/"" doesn't override non-string oldvalues
+ [key3] = rebar_state:get(State1, test3),
+ [] = rebar_state:get(State1, test4).