Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Commit

Permalink
Add failing test cases for #34
Browse files Browse the repository at this point in the history
  • Loading branch information
felixSchl committed May 23, 2016
1 parent 0b14f54 commit 437e097
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions testcases.docopt
Original file line number Diff line number Diff line change
Expand Up @@ -2774,3 +2774,40 @@ $ prog --foo
$ prog --foo=abc
{"--foo": "abc"}

# Fix issue #34
# Option parser trips up if `--` is preseent in description RHS

r"""
usage: foo [options]
options:
--foo This is foo. Not applicable if --qux is given.
--bar This is bar.
"""

$ prog --bar
{"--bar": true}

r"""
usage: foo [options] <command>
options:
<command> this is command.
--foo This is foo. Not applicable if --qux is given.
--bar This is bar.
"""

$ prog --bar run
{"--bar": true, "<command>": "run", "COMMAND": "run"}

$ prog --bar
{"--bar": true}

r"""
usage: foo [options] <command>
options:
--foo This is foo. Not applicable if --qux is given.
<command> this is command.
--bar This is bar.
"""

$ prog --bar run
{"--bar": true, "<command>": "run", "COMMAND": "run"}

0 comments on commit 437e097

Please sign in to comment.