Test an Optional with a multi-character single-dash option string
| 382 | |
| 383 | |
| 384 | class TestOptionalsSingleDashLong(ParserTestCase): |
| 385 | """Test an Optional with a multi-character single-dash option string""" |
| 386 | |
| 387 | argument_signatures = [Sig('-foo')] |
| 388 | failures = ['-foo', 'a', '--foo', '-foo --foo', '-foo -y', '-fooa'] |
| 389 | successes = [ |
| 390 | ('', NS(foo=None)), |
| 391 | ('-foo a', NS(foo='a')), |
| 392 | ('-foo -1', NS(foo='-1')), |
| 393 | ('-fo a', NS(foo='a')), |
| 394 | ('-f a', NS(foo='a')), |
| 395 | ] |
| 396 | |
| 397 | |
| 398 | class TestOptionalsSingleDashSubsetAmbiguous(ParserTestCase): |