show missing argument error only for last flag

closes #6483
This commit is contained in:
Johannes Altmanninger
2020-01-08 14:59:26 +01:00
parent 0e707b88f0
commit fdf398e435
5 changed files with 8 additions and 6 deletions

View File

@@ -305,5 +305,5 @@ begin
end
# #6483 - error messages for missing arguments
argparse -n foo r/required= -- foo -r
# CHECKERR: foo: Expected argument for option -r
argparse -n foo q r/required= -- foo -qr
# CHECKERR: foo: Expected argument for option r

View File

@@ -330,7 +330,7 @@ echo "stdin" | string repeat -n1 "and arg"; and echo "exit 0"
# CHECKERR: string repeat: Too many arguments
string repeat -n; and echo "exit 0"
# CHECKERR: string repeat: Expected argument for option -n
# CHECKERR: string repeat: Expected argument for option n
# FIXME: Also triggers usage
# string repeat -l fakearg