diff --git a/.gitignore b/.gitignore index d7efa53..6d830cd 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ bin # IDE .vscode +.idea # Test binary, built with `go test -c` *.test diff --git a/README.md b/README.md index a036297..671a2ce 100644 --- a/README.md +++ b/README.md @@ -204,6 +204,13 @@ Usage of gherkingen [FEATURE_FILE]: add parallel mark (deprecated, enabled by default) (default true) -help print usage + -language string + Specifies the natural language used to describe the feature. + This flag is optional if language information is included in the feature file name, or if the feature is written in English. + The file name should be formatted as follows: ..feature if language hint is included, or .feature if it is not. + When provided, the 'language' flag takes precedence over the language hint from the file name. (default "en") + -languages + list supported natural feature languages -list list internal templates -package string @@ -251,7 +258,7 @@ create a pull request for supporting templates for them. For this: 3. Check: `make lint check.generate test`. 4. Commit&Push, create a PR. -## Language support +## Programming language support Templates are very customizable, so you can even generate non-golang code. In the command-line tool specify `raw` format using `-format` flag and your template using `-template` flag: `gherkingen -format raw -template example.tmpl example.feature`. diff --git a/internal/app/app.feature b/internal/app/app.feature index b9de0e8..94fc97f 100644 --- a/internal/app/app.feature +++ b/internal/app/app.feature @@ -1,55 +1,56 @@ Feature: Application command line tool + Scenario Outline: User wants to generate the output in given format When is given And is provided Then the output should be generated Examples: - | | | | - | app.feature | go | does | - | app.feature | json | does | - | app.feature | raw | does | - | app.feature | invalid | does not | - | notfound.feature | raw | does not | + | | | | + | app.feature | go | does | + | app.feature | json | does | + | app.feature | raw | does | + | app.feature | invalid | does not | + | notfound.feature | raw | does not | Scenario Outline: User wants to see usage information When is provided Then usage should be printed Examples: - | | - | --help | + | | + | --help | Scenario Outline: User wants to list built-in templates When is provided Then templates should be printed Examples: - | | - | --list | + | | + | --list | Scenario Outline: User wants to use custom template When