summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2018-01-30 16:01:34 -0500
committerGitHub <noreply@github.com>2018-01-30 16:01:34 -0500
commit2a558d4d983cbf1c5e8ec2c438ccb25f0f3654c0 (patch)
treed8c516300bf029ec7ae19e1b797c205c9d85605c /test
parentb5d7d358ffe68c0cd87715033427b55cd6b2dc4b (diff)
parentcc70e4fe2ff7b3e318d353972021e548fc513440 (diff)
Merge pull request #1707 from schlagert/issue_1704
Issue #1704: Fix alias provider argument passing
Diffstat (limited to 'test')
-rw-r--r--test/rebar_alias_SUITE.erl27
1 files changed, 26 insertions, 1 deletions
diff --git a/test/rebar_alias_SUITE.erl b/test/rebar_alias_SUITE.erl
index f889ae4..2544aac 100644
--- a/test/rebar_alias_SUITE.erl
+++ b/test/rebar_alias_SUITE.erl
@@ -13,7 +13,7 @@ init_per_testcase(_, Config) ->
end_per_testcase(_, _Config) ->
ok.
-all() -> [command, args, many, override_default, no_circular].
+all() -> [command, args, many, override_default, no_circular, release].
%% namespaces: unsupported, untested.
command() ->
@@ -111,3 +111,28 @@ no_circular(Config) ->
{error, [$C,$o,$m,$m,$a,$n,$d,$ ,"test",$ ,$n,$o,$t,$ ,
$f,$o,$u,$n,$d]}),
ok.
+
+release() ->
+ [{doc, "An alias for a release command"}].
+release(Config) ->
+ AppDir = ?config(apps, Config),
+
+ Name = rebar_test_utils:create_random_name("alias_release_"),
+ Vsn = rebar_test_utils:create_random_vsn(),
+ rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]),
+ RebarConfig = [{relx,
+ [{release, {skipped_release, Vsn}, []},
+ {release, {the_release, Vsn}, [list_to_atom(Name)]},
+ {lib_dirs, [AppDir]}]},
+ {alias,
+ [{the_rel1, [clean, {release, "-n the_release"}]},
+ {the_rel2, [clean, {release, "--relname=the_release"}]}]}],
+ rebar_test_utils:run_and_check(
+ Config, RebarConfig,
+ ["the_rel1"],
+ {ok, [{release, the_release, Vsn, false}]}),
+ rebar_test_utils:run_and_check(
+ Config, RebarConfig,
+ ["the_rel2"],
+ {ok, [{release, the_release, Vsn, false}]}),
+ ok.