diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-06-28 17:09:31 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-06-28 17:09:31 -0500 |
commit | 7e0734efda17849317fc2184b6e6efcc500a3bf6 (patch) | |
tree | 2c5cb1c504fff3ae589a4374747d6765a1049e8b /test | |
parent | da7e15c9a569f161331d4ebef451bc3ee142321c (diff) |
add test of relx config sorting with 'extend release'
Diffstat (limited to 'test')
-rw-r--r-- | test/rebar_release_SUITE.erl | 21 |
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}]} + ). |