Diffusion Ark e01cfb41b398

cliinterface: refactor the replacement of ExtractArgs

Authored by elvisangelaccio on Mar 22 2016, 5:34 PM.

Description

cliinterface: refactor the replacement of ExtractArgs

The old algorithm used to edit the list of ExtractArgs by using indexes.
This was a mess and there was a bug in the replacement of PasswordSwitch.

We now create an empty list, which we populate while iterating over
the list of ExtractArgs. The replacement of each switch is performed in a
dedicated function, to simplify the implementation.

Unit tests are added, though only for clirar (for now).

Differential Revision: D1190

Details

Committed
elvisangelaccioMar 22 2016, 5:44 PM
Differential Revision
D1190: Sanitize replacement of CLI args
Parents
R36:42fc003f390a: Fix AddToArchive test
Branches
Unknown
Tags
Unknown