Fix: Error out when passing an argument to long option that takes no argument
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 9 Apr 2021 16:39:19 +0000 (12:39 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Sat, 10 Apr 2021 01:35:14 +0000 (21:35 -0400)
commit430fe8864aa297e333761b75eaad70900043e3d3
tree0e3ac1390644eefb008128fc3b95c0a2d575901a
parent1ae22b5e8335dfe14b805404a16b90817f1a99e1
Fix: Error out when passing an argument to long option that takes no argument

If the user defines a long option `--foo` and passes `--foo=arg`, the
current behavior is that the option foo is recognized and the argument
is ignored.  Change that to be an error.

It is currently not possible to pass arguments to short options using an
equal sign, so this doesn't apply to short options.

Change-Id: I4b0c50398161aebc81789fdb3fce19a80a5f6646
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
argpar/argpar.c
tests/test_argpar.c
This page took 0.023022 seconds and 4 git commands to generate.