diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/rebar_new_SUITE.erl | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/test/rebar_new_SUITE.erl b/test/rebar_new_SUITE.erl index 3cee6f2..b514a2b 100644 --- a/test/rebar_new_SUITE.erl +++ b/test/rebar_new_SUITE.erl @@ -6,7 +6,8 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -all() -> [app_git_user, app_hg_user, app_with_fallbacks]. +all() -> [app_git_user, app_hg_user, app_with_fallbacks, + app_with_flags1, app_with_flags2]. init_per_testcase(Case, Config0) -> @@ -95,6 +96,42 @@ app_hg_user(Config) -> {filename:join(["src", Name++"_app.erl"]), [Name]} ]). +app_with_flags1(Config) -> + Name = ?config(name, Config), + rebar_test_utils:run_and_check( + Config, [], + ["new", "test_app", "-f", Name], + {ok, []} + ), + validate_files( + Config, Name, + [{"LICENSE", []}, + {"README.md", []}, + {".gitignore", []}, + {"rebar.config", []}, + {filename:join(["src", Name++".app.src"]), [Name]}, + {filename:join(["src", Name++"_sup.erl"]), [Name]}, + {filename:join(["src", Name++"_app.erl"]), [Name]} + ]). + +app_with_flags2(Config) -> + Name = ?config(name, Config), + rebar_test_utils:run_and_check( + Config, [], + ["new", "-f", "test_app", Name], + {ok, []} + ), + validate_files( + Config, Name, + [{"LICENSE", []}, + {"README.md", []}, + {".gitignore", []}, + {"rebar.config", []}, + {filename:join(["src", Name++".app.src"]), [Name]}, + {filename:join(["src", Name++"_sup.erl"]), [Name]}, + {filename:join(["src", Name++"_app.erl"]), [Name]} + ]). + validate_files(_Config, Name, Checks) -> [begin Path = filename:join([Name, File]), |