mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
827258f32e
Split parsing of CLI arguments into separate functions: parsearg_op (operations) parsearg_global (global options) parsearg_{database,query,remove,sync,deptest,upgrade} Organization strictly follows the manpage (even where the manpage is incorrect) - these cases will be fixed in the following commits. Switch cases are copy/pasted and statements unrelated to chosen operation are deleted. Parsing logic adjusted as follows: 1) Parse operation 2) If we can bail out early (duplicate op, help/version requested) do so 3) Parse arguments again: foreach arg: if arg is operation: continue tryparse_args_specific_to_op if unsuccessful tryparse_args_global if unsuccessful print error message and exit Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
9 lines
177 B
Python
9 lines
177 B
Python
self.description = "Test invalid combination of command line options (-Qy)"
|
|
|
|
p = pmpkg("foobar")
|
|
self.addpkg2db("local", p)
|
|
|
|
self.args = "-Qy"
|
|
|
|
self.addrule("PACMAN_RETCODE=1")
|