Test an Optional with a single-dash option string
| 322 | # =============== |
| 323 | |
| 324 | class TestOptionalsSingleDash(ParserTestCase): |
| 325 | """Test an Optional with a single-dash option string""" |
| 326 | |
| 327 | argument_signatures = [Sig('-x')] |
| 328 | failures = ['-x', 'a', '--foo', '-x --foo', '-x -y'] |
| 329 | successes = [ |
| 330 | ('', NS(x=None)), |
| 331 | ('-x a', NS(x='a')), |
| 332 | ('-xa', NS(x='a')), |
| 333 | ('-x -1', NS(x='-1')), |
| 334 | ('-x-1', NS(x='-1')), |
| 335 | ] |
| 336 | |
| 337 | |
| 338 | class TestOptionalsSingleDashCombined(ParserTestCase): |