Open mmuurr opened 8 years ago
This is likely related to #21.
doc1 <- " prog Usage: prog [(--foo=X --bar=Y)] " doc2 <- " prog Usage: prog [options] [(--foo=X --bar=Y)] "
This call errors as expected:
> str(docopt::docopt(doc1, "--foo=bar", strict = TRUE))
Error: usage: prog [(--foo=X --bar=Y)]
This call succeeds as expected:
> str(docopt::docopt(doc1, "--foo=bar --bar=foo", strict = TRUE))
List of 2 $ --foo: chr "bar" $ --bar: chr "foo" - attr(*, "class")= chr [1:2] "docopt" "list"
This call should error, but doesn't:
> str(docopt::docopt(doc2, "--foo=bar", strict = TRUE))
List of 2 $ --foo: chr "bar" $ --bar: list() - attr(*, "class")= chr [1:2] "docopt" "list"
This is likely related to #21.
This call errors as expected:
This call succeeds as expected:
This call should error, but doesn't: