cucumber/cucumber-jvm — pull request #597 by friederbluemle (2013-09-27 22:36:56+00:00)
Title: Add command line option support for Android

This will enable cucumber-android test projects that are started through the activity manager (`adb shell am instrument`) to receive additional Cucumber options from the command line.

**General**
A normal test project would be started like this:
`adb shell am instrument -w com.mypackage.app.test/cucumber.api.android.CucumberInstrumentation`
The activity manager (`am`) supports additional extras for the `instrument` command:
`adb shell am instrument -w -e key value com.mypackage.app.test/cucumber.api.android.CucumberInstrumentation`
Multiple extras can be passed like this:
`-e key1 value1 -e key2 value2`

**Supported Cucumber options**

Cucumber option	am instrument argument

--glue PATH	-e glue PATH

--format FORMAT[:PATH_OR_URL]	-e format FORMAT[:PATH_OR_URL]

--tags TAG_EXPRESSION	-e tags TAG_EXPRESSION

--name REGEXP	-e name REGEXP

--[no-]-dry-run	-e dryRun true
-e noDryRun true

--[no-]-monochrome	-e monochrome true
-e noMonochrome true

--[no-]-strict	-e strict true
-e noStrict true

--snippets [underscore|camelcase]	-e snippets [underscore|camelcase]

--dotcucumber PATH_OR_URL	-e dotcucumber PATH_OR_URL

[ [FILE|DIR][:LINE[:LINE]*] ]+	-e features [ [FILE|DIR][:LINE[:LINE]*] ]+

**A few thing to note**
* You *cannot* pass just a key without a value, that mean a boolean option such as `--strict` would have to be passed like this: `-e strict true`
* Feature references can be passed: `-e features [ [FILE|DIR][:LINE[:LINE]*] ]+`
* Values containing spaces need to be passed like this: `-e name "'My Feature'"`
* It is not possible to pass the same key multiple times, e. g. `-e name Feature1 -e name Feature2` would result in the first name argument being overwritten by the second name argument: The test app would only see `Feature2`.
In order to pass options more than once, you would need to separate the values by two dashes `--`, like this: `-e name Feature1--Feature2`

Asking for comments from the community, especially on the selection of the option value separator. I don't particularly like the two dashes, but it works. Does anyone have a better suggestion?

The requirements are simple: It has to be a character or separator that is

1. command line compatible (that means `&` and `|` will not work)
2. not already used by Cucumber (e. g. `,` as in `--tags @tag1,@tag2`
3. unlikely to appear in any feature name, file/path/url name, or tag name

Thanks