aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/rlx_command_SUITE.erl15
-rw-r--r--test/rlx_release_SUITE.erl3
2 files changed, 16 insertions, 2 deletions
diff --git a/test/rlx_command_SUITE.erl b/test/rlx_command_SUITE.erl
index 6f726b4..5ea4769 100644
--- a/test/rlx_command_SUITE.erl
+++ b/test/rlx_command_SUITE.erl
@@ -24,6 +24,7 @@
end_per_suite/1,
all/0,
normal_passing_case/1,
+ lib_expansion_case/1,
lib_fail_case/1,
spec_parse_fail_case/1,
config_fail_case/1]).
@@ -41,7 +42,7 @@ end_per_suite(_Config) ->
ok.
all() ->
- [normal_passing_case, lib_fail_case, config_fail_case].
+ [normal_passing_case, lib_expansion_case, lib_fail_case, config_fail_case].
normal_passing_case(Config) ->
DataDir = proplists:get_value(data_dir, Config),
@@ -70,6 +71,18 @@ normal_passing_case(Config) ->
{{45,22},{[],[<<"build">>,21]}}, between}],
rlx_state:goals(State)).
+lib_expansion_case(Config) ->
+ DataDir = proplists:get_value(data_dir, Config),
+ Lib1 = filename:join(DataDir, <<"lib1">>),
+ Lib2 = filename:join(DataDir, <<"lib2">>),
+ ok = rlx_util:mkdir_p(Lib1),
+ ok = rlx_util:mkdir_p(Lib2),
+
+ CmdLine = ["-l", filename:join(DataDir, "*")],
+ {ok, {Opts, Targets}} = getopt:parse(relx:opt_spec_list(), CmdLine),
+ {ok, State} = rlx_cmd_args:args2state(Opts, Targets),
+ ?assertMatch([Lib1, Lib2],
+ rlx_state:lib_dirs(State)).
lib_fail_case(Config) ->
DataDir = proplists:get_value(data_dir, Config),
diff --git a/test/rlx_release_SUITE.erl b/test/rlx_release_SUITE.erl
index d16dce9..3087e63 100644
--- a/test/rlx_release_SUITE.erl
+++ b/test/rlx_release_SUITE.erl
@@ -130,7 +130,8 @@ make_extend_release(Config) ->
[goal_app_1,
goal_app_2]},
{release, {foo_test, "0.0.1", {extend, foo}},
- [goal_app_2]}]),
+ [goal_app_2]},
+ {lib_dirs, [filename:join(LibDir1, "*")]}]),
OutputDir = filename:join([proplists:get_value(data_dir, Config),
create_random_name("relx-output")]),
{ok, State} = relx:do(foo_test, undefined, [], [LibDir1], 3,