diff options
author | Eric <[email protected]> | 2012-09-10 08:23:12 -0500 |
---|---|---|
committer | Eric <[email protected]> | 2012-09-10 08:23:12 -0500 |
commit | 4505d4f1ed6a7ba0d390f262bdeee9c35bc5d7a4 (patch) | |
tree | 06cb1eb4a99ce4a500a8646c503222d8aa4d2d77 /test | |
parent | 9aab4d7a16fba5dfcf4d60b58a05cc765eca3335 (diff) | |
download | relx-4505d4f1ed6a7ba0d390f262bdeee9c35bc5d7a4.tar.gz relx-4505d4f1ed6a7ba0d390f262bdeee9c35bc5d7a4.tar.bz2 relx-4505d4f1ed6a7ba0d390f262bdeee9c35bc5d7a4.zip |
add config validation support to the system
Diffstat (limited to 'test')
-rw-r--r-- | test/rclt_command_SUITE.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/rclt_command_SUITE.erl b/test/rclt_command_SUITE.erl index 5967cc5..5adf54a 100644 --- a/test/rclt_command_SUITE.erl +++ b/test/rclt_command_SUITE.erl @@ -26,7 +26,8 @@ normal_passing_case/1, lib_fail_case/1, output_fail_case/1, - spec_parse_fail_case/1]). + spec_parse_fail_case/1, + config_fail_case/1]). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). @@ -41,7 +42,7 @@ end_per_suite(_Config) -> ok. all() -> - [normal_passing_case, lib_fail_case, output_fail_case]. + [normal_passing_case, lib_fail_case, output_fail_case, config_fail_case]. normal_passing_case(Config) -> DataDir = proplists:get_value(data_dir, Config), @@ -98,3 +99,9 @@ spec_parse_fail_case(_Config) -> CmdLine = ["-g", Spec], ?assertMatch({error, {failed_to_parse, _Spec}}, rcl_cmd_args:args2state(getopt:parse(relcool:opt_spec_list(), CmdLine))). + +config_fail_case(_Config) -> + ConfigFile = "does-not-exist", + CmdLine = [ConfigFile], + ?assertMatch({error, {invalid_config_file, ConfigFile}}, + rcl_cmd_args:args2state(getopt:parse(relcool:opt_spec_list(), CmdLine))). |