1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-10 11:35:00 -05:00
pacman/test
Dave Reisner 8679cd68d8 scripts/library: introduce parseopts
This will replace our current options parser used in pacman-key,
makepkg, and ideally elsewhere. It follows heuristics closer to that of
GNU getopt long (and thus pacman itself), with the exception that it
does not allow for options with optional arguments. Due to the way this
parser will be used, this sort of functionality will not be needed.

Instead of relying on eval+set, options are normalized into an array,
OPTRET, which callers should expect to be populated after returning from
parseopts. This avoids problems with quotes and spaces in arguments,
assuming that the user quotes properly when passing into the
application.

A new test harness for parseopts is added in test/scripts.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-24 08:38:36 -05:00
..
pacman Remove SyncFirst option 2012-04-12 08:55:49 -05:00
scripts scripts/library: introduce parseopts 2012-04-24 08:38:36 -05:00
util Format pacsort and vercmp testsuite output 2011-10-07 09:21:58 -05:00