From 49a45620c2c0431583969192fbefe44ee6f7850c Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 18 Sep 2012 15:51:47 -0700 Subject: make sure errors carry the name of the module that created them This allows errors to be printed at the source --- test/rclt_command_SUITE.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/rclt_command_SUITE.erl') 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))). -- cgit v1.2.3