diff options
author | Tristan Sloughter <[email protected]> | 2013-02-07 12:19:10 -0800 |
---|---|---|
committer | Tristan Sloughter <[email protected]> | 2013-02-07 12:19:10 -0800 |
commit | 6d27a1af18f8337bbcfd3994787bf8725b94868a (patch) | |
tree | 93feb4e317d35d9d69443551b83175d21a0a0808 /test/rclt_command_SUITE.erl | |
parent | aac84f08f2b557ae2a7bf45001c47aec503203ab (diff) | |
parent | 6734e9ec4e0dd4c0678d10e8b8e48552ffb4e995 (diff) | |
download | relx-6d27a1af18f8337bbcfd3994787bf8725b94868a.tar.gz relx-6d27a1af18f8337bbcfd3994787bf8725b94868a.tar.bz2 relx-6d27a1af18f8337bbcfd3994787bf8725b94868a.zip |
Merge pull request #28 from erlware/next
Next
Diffstat (limited to 'test/rclt_command_SUITE.erl')
-rw-r--r-- | test/rclt_command_SUITE.erl | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/test/rclt_command_SUITE.erl b/test/rclt_command_SUITE.erl index 46449e9..3d06dad 100644 --- a/test/rclt_command_SUITE.erl +++ b/test/rclt_command_SUITE.erl @@ -1,4 +1,4 @@ -%%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*- +%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 92 -*- %%% Copyright 2012 Erlware, LLC. All Rights Reserved. %%% %%% This file is provided to you under the Apache License, @@ -25,7 +25,6 @@ all/0, normal_passing_case/1, lib_fail_case/1, - output_fail_case/1, spec_parse_fail_case/1, config_fail_case/1]). @@ -42,7 +41,7 @@ end_per_suite(_Config) -> ok. all() -> - [normal_passing_case, lib_fail_case, output_fail_case, config_fail_case]. + [normal_passing_case, lib_fail_case, config_fail_case]. normal_passing_case(Config) -> DataDir = proplists:get_value(data_dir, Config), @@ -59,8 +58,7 @@ normal_passing_case(Config) -> RelVsn = "33.222", CmdLine = ["-V", LogLevel, "-g",Goal1,"-g",Goal2, "-l", Lib1, "-l", Lib2, "-n", RelName, "-v", RelVsn, "-o", Outdir], - {ok, {State, Target}} = rcl_cmd_args:args2state(getopt:parse(relcool:opt_spec_list(), CmdLine)), - ?assertMatch([], Target), + {ok, State} = rcl_cmd_args:args2state(getopt:parse(relcool:opt_spec_list(), CmdLine)), ?assertMatch([Lib1, Lib2], rcl_state:lib_dirs(State)), ?assertMatch(Outdir, rcl_state:output_dir(State)), @@ -82,18 +80,6 @@ lib_fail_case(Config) -> ?assertMatch({error, {_, {not_directory, Lib2}}}, rcl_cmd_args:args2state(getopt:parse(relcool:opt_spec_list(), CmdLine))). - -output_fail_case(Config) -> - DataDir = proplists:get_value(data_dir, Config), - UnwritableDir = filename:join([DataDir, "unwritable"]), - ok = rcl_util:mkdir_p(UnwritableDir), - ok = file:change_mode(UnwritableDir, 8#555), - CanNotCreate = filename:join([UnwritableDir, "out-dir-should-not-create"]), - - CmdLine = ["-o", 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], @@ -102,6 +88,6 @@ spec_parse_fail_case(_Config) -> config_fail_case(_Config) -> ConfigFile = "does-not-exist", - CmdLine = [ConfigFile], + CmdLine = ["-c", ConfigFile], ?assertMatch({error, {_, {invalid_config_file, ConfigFile}}}, rcl_cmd_args:args2state(getopt:parse(relcool:opt_spec_list(), CmdLine))). |