CLI11
CLI11 copied to clipboard
<NUMBER> <UNIT> option parsing must take care of wrong usage.
With current master / v1.9.1, it is observed that... for an option relating to <NUMBER> <UNIT> behaves incorrectly in the following scenarios :
- When options passed by mistake does not contain space. "1ms" is considered as 1 ignoring the significance of ms (millisecond)
- When unit is not passed at all. "1 " . Same behavior as above. Not as expected.
In my opinion, we need additional check on the input strings before using atoi/atof equivalents.
Are you using the CLI::AsNumberWithUnit transform? or are you talking about just plain numbers that happen to have strngs at the end?