Test an Optional with a multi-character single-dash option string
| 362 | |
| 363 | |
| 364 | class TestOptionalsSingleDashLong(ParserTestCase): |
| 365 | """Test an Optional with a multi-character single-dash option string""" |
| 366 | |
| 367 | argument_signatures = [Sig('-foo')] |
| 368 | failures = ['-foo', 'a', '--foo', '-foo --foo', '-foo -y', '-fooa'] |
| 369 | successes = [ |
| 370 | ('', NS(foo=None)), |
| 371 | ('-foo a', NS(foo='a')), |
| 372 | ('-foo -1', NS(foo='-1')), |
| 373 | ('-fo a', NS(foo='a')), |
| 374 | ('-f a', NS(foo='a')), |
| 375 | ] |
| 376 | |
| 377 | |
| 378 | class TestOptionalsSingleDashSubsetAmbiguous(ParserTestCase): |