Test an Optional with a single-dash option string
| 342 | # =============== |
| 343 | |
| 344 | class TestOptionalsSingleDash(ParserTestCase): |
| 345 | """Test an Optional with a single-dash option string""" |
| 346 | |
| 347 | argument_signatures = [Sig('-x')] |
| 348 | failures = ['-x', 'a', '--foo', '-x --foo', '-x -y'] |
| 349 | successes = [ |
| 350 | ('', NS(x=None)), |
| 351 | ('-x a', NS(x='a')), |
| 352 | ('-xa', NS(x='a')), |
| 353 | ('-x -1', NS(x='-1')), |
| 354 | ('-x-1', NS(x='-1')), |
| 355 | ] |
| 356 | |
| 357 | |
| 358 | class TestOptionalsSingleDashCombined(ParserTestCase): |