diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_misc.erl | 3 | ||||
| -rw-r--r-- | src/rabbit_tests.erl | 4 |
2 files changed, 1 insertions, 6 deletions
diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl index 661a4cb4e4..1d7d39e77b 100644 --- a/src/rabbit_misc.erl +++ b/src/rabbit_misc.erl @@ -785,8 +785,7 @@ process_opts(Defs, C, [A | As], Found, KVs, Outs) -> Defs, C, As, Found, dict:store(A, true, KVs), Outs); {option, _, _} -> case As of - [] -> process_opts(Defs, C, [], Found, - KVs, [A | Outs]); + [] -> no_command; [V | As1] -> process_opts( Defs, C, As1, Found, dict:store(A, V, KVs), Outs) diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index 7c287b0adc..bae4928de4 100644 --- a/src/rabbit_tests.erl +++ b/src/rabbit_tests.erl @@ -837,10 +837,6 @@ test_arguments_parser() -> %% If the flag "eats" the command, the command won't be recognised check_parse_arguments(no_command, GetOptions, ["-o1", "command1", "quux"]), - %% If the flag doesn't have an argument, it won't be recognised - check_parse_arguments( - {ok, {command1, [{"-f1", false}, {"-o1", "foo"}], ["-o1"]}}, - GetOptions, ["command1", "-o1"]), %% If a flag eats another flag, the eaten flag won't be recognised check_parse_arguments( {ok, {command1, [{"-f1", false}, {"-o1", "-f1"}], []}}, |
