Add some formatting to CLIParser error messages

This commit is contained in:
Kovid Goyal
2025-04-29 07:26:48 +05:30
parent 8d278a741a
commit b9326f5c94
2 changed files with 34 additions and 12 deletions

View File

@@ -112,10 +112,10 @@ version
t('--simple-string --help -- -1', leftover=['-1'], simple_string='--help')
t('-1l=a --list=b -c b --list c', bool_set=True, choice='b', list=list('abc'))
t('-1s= -l "" --list= x', leftover=['x'], bool_set=True, simple_string='', list=['', ''])
t('--choice moo', fails='a, b, c')
t('--choice moo', fails=r'moo')
t('--bool', fails='mbiguous')
t('-1c moo', fails='a, b, c')
t('-10c=moo', fails='a, b, c')
t('-1c moo', fails=r'moo')
t('-10c=moo', fails=r'moo')
t('-1 -h', fails=True, help_called=True)
t('-1 --help', fails=True, help_called=True)
t('-1 -0v', fails=True, version_called=True)