From 7e0734efda17849317fc2184b6e6efcc500a3bf6 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sun, 28 Jun 2015 17:09:31 -0500 Subject: add test of relx config sorting with 'extend release' --- test/rebar_release_SUITE.erl | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'test/rebar_release_SUITE.erl') 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}]} + ). -- cgit v1.1