summaryrefslogtreecommitdiff
path: root/test/rebar_release_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/rebar_release_SUITE.erl')
-rw-r--r--test/rebar_release_SUITE.erl21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/rebar_release_SUITE.erl b/test/rebar_release_SUITE.erl
index 3809106..1ef0771 100644
--- a/test/rebar_release_SUITE.erl
+++ b/test/rebar_release_SUITE.erl
@@ -6,7 +6,8 @@
all() -> [release,
dev_mode_release,
profile_dev_mode_override_release,
- tar].
+ tar,
+ extend_release].
init_per_testcase(Case, Config0) ->
Config = rebar_test_utils:init_rebar_state(Config0),
@@ -90,3 +91,21 @@ tar(Config) ->
["tar"],
{ok, [{release, list_to_atom(Name), Vsn, false}, {tar, Name, Vsn}]}
).
+
+%% Test that the order of release config args is not lost. If it is extend would fail.
+extend_release(Config) ->
+ AppDir = ?config(apps, Config),
+ Name = ?config(name, Config),
+ Vsn = "1.0.0",
+ {ok, RebarConfig} =
+ file:consult(rebar_test_utils:create_config(AppDir,
+ [{relx, [{release, {list_to_atom(Name), Vsn},
+ [list_to_atom(Name)]},
+ {release, {extended, Vsn, {extend, list_to_atom(Name)}},
+ []},
+ {lib_dirs, [AppDir]}]}])),
+ rebar_test_utils:run_and_check(
+ Config, RebarConfig,
+ ["release", "-n", "extended"],
+ {ok, [{release, extended, Vsn, false}]}
+ ).