diff options
author | Eric <[email protected]> | 2012-09-18 15:51:47 -0700 |
---|---|---|
committer | Eric <[email protected]> | 2012-09-18 15:51:47 -0700 |
commit | 49a45620c2c0431583969192fbefe44ee6f7850c (patch) | |
tree | 5f7624b3473797637f711bc0f345b7290b4a92b4 /test | |
parent | 79a28e0e498c4727dde2546ff83da6cb81e907e6 (diff) | |
download | relx-49a45620c2c0431583969192fbefe44ee6f7850c.tar.gz relx-49a45620c2c0431583969192fbefe44ee6f7850c.tar.bz2 relx-49a45620c2c0431583969192fbefe44ee6f7850c.zip |
make sure errors carry the name of the module that created them
This allows errors to be printed at the source
Diffstat (limited to 'test')
-rw-r--r-- | test/rclt_command_SUITE.erl | 8 | ||||
-rw-r--r-- | test/rclt_discover_SUITE.erl | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/test/rclt_command_SUITE.erl b/test/rclt_command_SUITE.erl index 5adf54a..fa4fc23 100644 --- a/test/rclt_command_SUITE.erl +++ b/test/rclt_command_SUITE.erl @@ -79,7 +79,7 @@ lib_fail_case(Config) -> ok = rcl_util:mkdir_p(Lib1), CmdLine = ["-l", Lib1, "-l", Lib2], - ?assertMatch({error, {not_directory, Lib2}}, + ?assertMatch({error, {_, {not_directory, Lib2}}}, rcl_cmd_args:args2state(getopt:parse(relcool:opt_spec_list(), CmdLine))). @@ -91,17 +91,17 @@ output_fail_case(Config) -> CanNotCreate = filename:join([UnwritableDir, "out-dir-should-not-create"]), CmdLine = ["-o", CanNotCreate], - ?assertMatch({error, {unable_to_create_output_dir, CanNotCreate}}, + ?assertMatch({error, {_, {unable_to_create_output_dir, CanNotCreate}}}, rcl_cmd_args:args2state(getopt:parse(relcool:opt_spec_list(), CmdLine))). spec_parse_fail_case(_Config) -> Spec = "aaeu:3333:33.22a44", CmdLine = ["-g", Spec], - ?assertMatch({error, {failed_to_parse, _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}}, + ?assertMatch({error, {_, {invalid_config_file, ConfigFile}}}, rcl_cmd_args:args2state(getopt:parse(relcool:opt_spec_list(), CmdLine))). diff --git a/test/rclt_discover_SUITE.erl b/test/rclt_discover_SUITE.erl index 0929e4a..63d7841 100644 --- a/test/rclt_discover_SUITE.erl +++ b/test/rclt_discover_SUITE.erl @@ -113,7 +113,7 @@ no_beam_case(Config) -> State0 = proplists:get_value(state, Config), {DiscoverProvider, {ok, State1}} = rcl_provider:new(rcl_prv_discover, State0), EbinDir = filename:join([LibDir2, BadName, "ebin"]), - ?assertMatch({error, [{no_beam_files, EbinDir}]}, + ?assertMatch({error, {_, [{no_beam_files, EbinDir}]}}, rcl_provider:do(DiscoverProvider, State1)). bad_ebin_case(Config) -> @@ -144,7 +144,7 @@ bad_ebin_case(Config) -> State0 = proplists:get_value(state, Config), {DiscoverProvider, {ok, State1}} = rcl_provider:new(rcl_prv_discover, State0), - ?assertMatch({error, [{invalid_app_file, Filename}]}, + ?assertMatch({error, {_, [{invalid_app_file, Filename}]}}, rcl_provider:do(DiscoverProvider, State1)). |