From bff3ff13935e04f86dea4a51e4cfed88531487df Mon Sep 17 00:00:00 2001 From: Maksym Kryvchun Date: Sun, 26 Jun 2022 11:14:49 +0300 Subject: [PATCH] Feat/upgrade deps (#50) * Upgrade deps * Upgrade deps * Fix linter --- go.mod | 10 +- go.sum | 24 +- internal/generator/generator.go | 2 +- internal/model/document.go | 2 +- internal/model/document_test.go | 2 +- .../v19 => common/gherkin/go/v24}/.gitignore | 0 .../v19 => common/gherkin/go/v24}/.rsync | 1 - .../v19 => common/gherkin/go/v24}/.subrepo | 0 .../gherkin/go/v24}/.whitesource | 0 .../v19 => common/gherkin/go/v24}/LICENSE | 0 .../v19 => common/gherkin/go/v24}/Makefile | 44 +- .../v19 => common/gherkin/go/v24}/README.md | 0 .../gherkin/go/v24}/astbuilder.go | 11 +- .../v19 => common/gherkin/go/v24}/default.mk | 34 +- .../cucumber/common/gherkin/go/v24/dialect.go | 58 + .../common/gherkin/go/v24/dialects_builtin.go | 4843 +++++++++++++++++ .../gherkin/go/v24/dialects_builtin.go.jq | 103 + .../gherkin/go/v24}/gherkin-languages.json | 66 +- .../gherkin/go/v24}/gherkin.berp | 0 .../v19 => common/gherkin/go/v24}/gherkin.go | 7 +- .../v19 => common/gherkin/go/v24}/matcher.go | 73 +- .../v19 => common/gherkin/go/v24}/messages.go | 2 +- .../v19 => common/gherkin/go/v24}/parser.go | 0 .../gherkin/go/v24}/parser.go.razor | 0 .../v19 => common/gherkin/go/v24}/pickles.go | 32 +- .../gherkin/go/v24}/test.feature | 0 .../v19 => common/gherkin/go/v24}/test.sh | 0 .../v16 => common/messages/go/v19}/.gitignore | 0 .../v16 => common/messages/go/v19}/.rsync | 0 .../v16 => common/messages/go/v19}/.subrepo | 0 .../v16 => common/messages/go/v19}/LICENSE | 0 .../cucumber/common/messages/go/v19/Makefile | 9 + .../v16 => common/messages/go/v19}/default.mk | 34 +- .../messages/go/v19}/id_generator.go | 0 .../messages/go/v19}/messages.go | 81 +- .../messages/go/v19}/time_conversion.go | 0 .../cucumber/gherkin-go/v19/dialect.go | 51 - .../gherkin-go/v19/dialects_builtin.go | 3652 ------------- .../gherkin-go/v19/dialects_builtin.go.jq | 33 - .../cucumber/messages-go/v16/Makefile | 8 - vendor/github.com/davecgh/go-spew/LICENSE | 2 +- .../github.com/davecgh/go-spew/spew/bypass.go | 187 +- .../davecgh/go-spew/spew/bypasssafe.go | 2 +- .../github.com/davecgh/go-spew/spew/common.go | 2 +- .../github.com/davecgh/go-spew/spew/dump.go | 10 +- .../github.com/davecgh/go-spew/spew/format.go | 4 +- .../testify/assert/assertion_compare.go | 76 +- .../assert/assertion_compare_can_convert.go | 16 + .../assert/assertion_compare_legacy.go | 16 + .../testify/assert/assertion_format.go | 12 + .../testify/assert/assertion_forward.go | 24 + .../testify/assert/assertion_order.go | 8 +- .../stretchr/testify/assert/assertions.go | 119 +- .../stretchr/testify/require/require.go | 30 + .../testify/require/require_forward.go | 24 + vendor/gopkg.in/yaml.v3/.travis.yml | 16 - vendor/gopkg.in/yaml.v3/apic.go | 1 + vendor/gopkg.in/yaml.v3/decode.go | 143 +- vendor/gopkg.in/yaml.v3/emitterc.go | 58 +- vendor/gopkg.in/yaml.v3/encode.go | 30 +- vendor/gopkg.in/yaml.v3/parserc.go | 57 +- vendor/gopkg.in/yaml.v3/scannerc.go | 49 +- vendor/gopkg.in/yaml.v3/yaml.go | 40 +- vendor/gopkg.in/yaml.v3/yamlh.go | 2 + vendor/modules.txt | 14 +- 65 files changed, 5970 insertions(+), 4154 deletions(-) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/.gitignore (100%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/.rsync (87%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/.subrepo (100%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/.whitesource (100%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/LICENSE (100%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/Makefile (52%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/README.md (100%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/astbuilder.go (98%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/default.mk (77%) create mode 100644 vendor/github.com/cucumber/common/gherkin/go/v24/dialect.go create mode 100644 vendor/github.com/cucumber/common/gherkin/go/v24/dialects_builtin.go create mode 100644 vendor/github.com/cucumber/common/gherkin/go/v24/dialects_builtin.go.jq rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/gherkin-languages.json (98%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/gherkin.berp (100%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/gherkin.go (92%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/matcher.go (81%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/messages.go (98%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/parser.go (100%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/parser.go.razor (100%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/pickles.go (87%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/test.feature (100%) rename vendor/github.com/cucumber/{gherkin-go/v19 => common/gherkin/go/v24}/test.sh (100%) rename vendor/github.com/cucumber/{messages-go/v16 => common/messages/go/v19}/.gitignore (100%) rename vendor/github.com/cucumber/{messages-go/v16 => common/messages/go/v19}/.rsync (100%) rename vendor/github.com/cucumber/{messages-go/v16 => common/messages/go/v19}/.subrepo (100%) rename vendor/github.com/cucumber/{messages-go/v16 => common/messages/go/v19}/LICENSE (100%) create mode 100644 vendor/github.com/cucumber/common/messages/go/v19/Makefile rename vendor/github.com/cucumber/{messages-go/v16 => common/messages/go/v19}/default.mk (77%) rename vendor/github.com/cucumber/{messages-go/v16 => common/messages/go/v19}/id_generator.go (100%) rename vendor/github.com/cucumber/{messages-go/v16 => common/messages/go/v19}/messages.go (86%) rename vendor/github.com/cucumber/{messages-go/v16 => common/messages/go/v19}/time_conversion.go (100%) delete mode 100644 vendor/github.com/cucumber/gherkin-go/v19/dialect.go delete mode 100644 vendor/github.com/cucumber/gherkin-go/v19/dialects_builtin.go delete mode 100644 vendor/github.com/cucumber/gherkin-go/v19/dialects_builtin.go.jq delete mode 100644 vendor/github.com/cucumber/messages-go/v16/Makefile create mode 100644 vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go create mode 100644 vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go delete mode 100644 vendor/gopkg.in/yaml.v3/.travis.yml diff --git a/go.mod b/go.mod index c0a9ef1..c2a471e 100644 --- a/go.mod +++ b/go.mod @@ -3,17 +3,17 @@ module github.com/hedhyw/gherkingen/v2 go 1.18 require ( - github.com/cucumber/gherkin-go/v19 v19.0.3 - github.com/cucumber/messages-go/v16 v16.0.1 + github.com/cucumber/common/gherkin/go/v24 v24.0.0 + github.com/cucumber/common/messages/go/v19 v19.1.2 github.com/google/uuid v1.3.0 github.com/hedhyw/semerr v0.4.0 github.com/iancoleman/strcase v0.2.0 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.7.5 ) require ( - github.com/davecgh/go-spew v1.1.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index e3fb478..6589c40 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,11 @@ -github.com/cucumber/gherkin-go/v19 v19.0.3 h1:mMSKu1077ffLbTJULUfM5HPokgeBcIGboyeNUof1MdE= -github.com/cucumber/gherkin-go/v19 v19.0.3/go.mod h1:jY/NP6jUtRSArQQJ5h1FXOUgk5fZK24qtE7vKi776Vw= -github.com/cucumber/messages-go/v16 v16.0.0/go.mod h1:EJcyR5Mm5ZuDsKJnT2N9KRnBK30BGjtYotDKpwQ0v6g= -github.com/cucumber/messages-go/v16 v16.0.1 h1:fvkpwsLgnIm0qugftrw2YwNlio+ABe2Iu94Ap8GMYIY= -github.com/cucumber/messages-go/v16 v16.0.1/go.mod h1:EJcyR5Mm5ZuDsKJnT2N9KRnBK30BGjtYotDKpwQ0v6g= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/cucumber/common/gherkin/go/v24 v24.0.0 h1:ppb74NSYmsySEbck0hpvnINHkn9PQPwyG+kK2bm3xLg= +github.com/cucumber/common/gherkin/go/v24 v24.0.0/go.mod h1:qtxmXJsRMJmRh+ZX49Ez8cYvtK1Il9E+B0YdYcPsDPg= +github.com/cucumber/common/messages/go/v19 v19.0.0/go.mod h1:O6WWH/SrhgAh1tKsKoYufycU9iTso4FSYH2xur+zruY= +github.com/cucumber/common/messages/go/v19 v19.1.2 h1:8/ZkW9rj3KQo/regmI8kcy48tk57m427Olb7Y0lXcN4= +github.com/cucumber/common/messages/go/v19 v19.1.2/go.mod h1:0KLDvMVmmkEZcWUSKxFHSUSLS1gjujBbPN0p41IwwJ4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -17,9 +17,13 @@ github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.7.5 h1:s5PTfem8p8EbKQOctVV53k6jCJt3UX4IEJzwh+C324Q= +github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/generator/generator.go b/internal/generator/generator.go index 7595265..3a1fe7f 100644 --- a/internal/generator/generator.go +++ b/internal/generator/generator.go @@ -8,7 +8,7 @@ import ( "github.com/hedhyw/gherkingen/v2/internal/docplugin" "github.com/hedhyw/gherkingen/v2/internal/model" - "github.com/cucumber/gherkin-go/v19" + gherkin "github.com/cucumber/common/gherkin/go/v24" "github.com/google/uuid" "github.com/hedhyw/semerr/pkg/v1/semerr" ) diff --git a/internal/model/document.go b/internal/model/document.go index 636591d..ceba559 100644 --- a/internal/model/document.go +++ b/internal/model/document.go @@ -1,7 +1,7 @@ package model import ( - "github.com/cucumber/messages-go/v16" + messages "github.com/cucumber/common/messages/go/v19" ) // GherkinDocument is a core document. diff --git a/internal/model/document_test.go b/internal/model/document_test.go index 6ac96fc..130c5a9 100644 --- a/internal/model/document_test.go +++ b/internal/model/document_test.go @@ -6,7 +6,7 @@ import ( "github.com/hedhyw/gherkingen/v2/internal/model" - "github.com/cucumber/messages-go/v16" + messages "github.com/cucumber/common/messages/go/v19" "github.com/stretchr/testify/assert" ) diff --git a/vendor/github.com/cucumber/gherkin-go/v19/.gitignore b/vendor/github.com/cucumber/common/gherkin/go/v24/.gitignore similarity index 100% rename from vendor/github.com/cucumber/gherkin-go/v19/.gitignore rename to vendor/github.com/cucumber/common/gherkin/go/v24/.gitignore diff --git a/vendor/github.com/cucumber/gherkin-go/v19/.rsync b/vendor/github.com/cucumber/common/gherkin/go/v24/.rsync similarity index 87% rename from vendor/github.com/cucumber/gherkin-go/v19/.rsync rename to vendor/github.com/cucumber/common/gherkin/go/v24/.rsync index 19d9eeb..1fc2c57 100644 --- a/vendor/github.com/cucumber/gherkin-go/v19/.rsync +++ b/vendor/github.com/cucumber/common/gherkin/go/v24/.rsync @@ -1,6 +1,5 @@ ../LICENSE LICENSE ../../.templates/github/ .github/ ../../.templates/go/ . -../testdata/ testdata/ ../gherkin.berp gherkin.berp ../gherkin-languages.json gherkin-languages.json diff --git a/vendor/github.com/cucumber/gherkin-go/v19/.subrepo b/vendor/github.com/cucumber/common/gherkin/go/v24/.subrepo similarity index 100% rename from vendor/github.com/cucumber/gherkin-go/v19/.subrepo rename to vendor/github.com/cucumber/common/gherkin/go/v24/.subrepo diff --git a/vendor/github.com/cucumber/gherkin-go/v19/.whitesource b/vendor/github.com/cucumber/common/gherkin/go/v24/.whitesource similarity index 100% rename from vendor/github.com/cucumber/gherkin-go/v19/.whitesource rename to vendor/github.com/cucumber/common/gherkin/go/v24/.whitesource diff --git a/vendor/github.com/cucumber/gherkin-go/v19/LICENSE b/vendor/github.com/cucumber/common/gherkin/go/v24/LICENSE similarity index 100% rename from vendor/github.com/cucumber/gherkin-go/v19/LICENSE rename to vendor/github.com/cucumber/common/gherkin/go/v24/LICENSE diff --git a/vendor/github.com/cucumber/gherkin-go/v19/Makefile b/vendor/github.com/cucumber/common/gherkin/go/v24/Makefile similarity index 52% rename from vendor/github.com/cucumber/gherkin-go/v19/Makefile rename to vendor/github.com/cucumber/common/gherkin/go/v24/Makefile index 1b6bbc1..7409cb1 100644 --- a/vendor/github.com/cucumber/gherkin-go/v19/Makefile +++ b/vendor/github.com/cucumber/common/gherkin/go/v24/Makefile @@ -3,20 +3,20 @@ include default.mk GHERKIN_DIALECTS := $(shell cat gherkin-languages.json | jq --compact-output --sort-keys . | base64 | tr -d '\n') LDFLAGS := "-X 'main.version=${NEW_VERSION}' -X 'main.gherkinDialects=${GHERKIN_DIALECTS}'" -GOOD_FEATURE_FILES = $(shell find testdata/good -name "*.feature") -BAD_FEATURE_FILES = $(shell find testdata/bad -name "*.feature") +GOOD_FEATURE_FILES = $(shell find ../testdata/good -name "*.feature") +BAD_FEATURE_FILES = $(shell find ../testdata/bad -name "*.feature") -TOKENS_GOLDEN = $(patsubst testdata/%.feature,testdata/%.feature.tokens,$(GOOD_FEATURE_FILES)) -ASTS_GOLDEN = $(patsubst testdata/%.feature,testdata/%.feature.ast.ndjson,$(GOOD_FEATURE_FILES)) -PICKLES_GOLDEN = $(patsubst testdata/%.feature,testdata/%.feature.pickles.ndjson,$(GOOD_FEATURE_FILES)) -SOURCES_GOLDEN = $(patsubst testdata/%.feature,testdata/%.feature.source.ndjson,$(GOOD_FEATURE_FILES)) -ERRORS_GOLDEN = $(patsubst testdata/%.feature,testdata/%.feature.errors.ndjson,$(BAD_FEATURE_FILES)) +TOKENS_GOLDEN = $(patsubst ../testdata/%.feature,testdata/%.feature.tokens,$(GOOD_FEATURE_FILES)) +ASTS_GOLDEN = $(patsubst ../testdata/%.feature,testdata/%.feature.ast.ndjson,$(GOOD_FEATURE_FILES)) +PICKLES_GOLDEN = $(patsubst ../testdata/%.feature,testdata/%.feature.pickles.ndjson,$(GOOD_FEATURE_FILES)) +SOURCES_GOLDEN = $(patsubst ../testdata/%.feature,testdata/%.feature.source.ndjson,$(GOOD_FEATURE_FILES)) +ERRORS_GOLDEN = $(patsubst ../testdata/%.feature,testdata/%.feature.errors.ndjson,$(BAD_FEATURE_FILES)) -TOKENS = $(patsubst testdata/%.feature,acceptance/testdata/%.feature.tokens,$(GOOD_FEATURE_FILES)) -ASTS = $(patsubst testdata/%.feature,acceptance/testdata/%.feature.ast.ndjson,$(GOOD_FEATURE_FILES)) -PICKLES = $(patsubst testdata/%.feature,acceptance/testdata/%.feature.pickles.ndjson,$(GOOD_FEATURE_FILES)) -SOURCES = $(patsubst testdata/%.feature,acceptance/testdata/%.feature.source.ndjson,$(GOOD_FEATURE_FILES)) -ERRORS = $(patsubst testdata/%.feature,acceptance/testdata/%.feature.errors.ndjson,$(BAD_FEATURE_FILES)) +TOKENS = $(patsubst ../testdata/%.feature,acceptance/testdata/%.feature.tokens,$(GOOD_FEATURE_FILES)) +ASTS = $(patsubst ../testdata/%.feature,acceptance/testdata/%.feature.ast.ndjson,$(GOOD_FEATURE_FILES)) +PICKLES = $(patsubst ../testdata/%.feature,acceptance/testdata/%.feature.pickles.ndjson,$(GOOD_FEATURE_FILES)) +SOURCES = $(patsubst ../testdata/%.feature,acceptance/testdata/%.feature.source.ndjson,$(GOOD_FEATURE_FILES)) +ERRORS = $(patsubst ../testdata/%.feature,acceptance/testdata/%.feature.errors.ndjson,$(BAD_FEATURE_FILES)) .DELETE_ON_ERROR: @@ -35,57 +35,57 @@ bin/gherkin-generate-tokens: .deps $(GO_SOURCE_FILES) parser.go dialects_builtin $(EXE): parser.go dialects_builtin.go -testdata/%.feature.tokens: testdata/%.feature +testdata/%.feature.tokens: ../testdata/%.feature ifdef GOLDEN mkdir -p $(@D) bin/gherkin-generate-tokens $< > $@ endif -acceptance/testdata/%.feature.tokens: testdata/%.feature testdata/%.feature.tokens bin/gherkin-generate-tokens +acceptance/testdata/%.feature.tokens: ../testdata/%.feature ../testdata/%.feature.tokens bin/gherkin-generate-tokens mkdir -p $(@D) bin/gherkin-generate-tokens $< > $@ diff --unified $<.tokens $@ -testdata/%.feature.ast.ndjson: testdata/%.feature $(EXE) +testdata/%.feature.ast.ndjson: ../testdata/%.feature $(EXE) ifdef GOLDEN mkdir -p $(@D) $(EXE) --predictable-ids --no-source --no-pickles $< | jq --sort-keys --compact-output > $@ endif -acceptance/testdata/%.feature.ast.ndjson: testdata/%.feature testdata/%.feature.ast.ndjson $(EXE) +acceptance/testdata/%.feature.ast.ndjson: ../testdata/%.feature ../testdata/%.feature.ast.ndjson $(EXE) mkdir -p $(@D) $(EXE) --predictable-ids --no-source --no-pickles $< | jq --sort-keys --compact-output > $@ diff --unified <(jq "." $<.ast.ndjson) <(jq "." $@) -testdata/%.feature.errors.ndjson: testdata/%.feature $(EXE) +testdata/%.feature.errors.ndjson: ../testdata/%.feature $(EXE) ifdef GOLDEN mkdir -p $(@D) $(EXE) --predictable-ids --no-source $< | jq --sort-keys --compact-output > $@ endif -acceptance/testdata/%.feature.errors.ndjson: testdata/%.feature testdata/%.feature.errors.ndjson $(EXE) +acceptance/testdata/%.feature.errors.ndjson: ../testdata/%.feature ../testdata/%.feature.errors.ndjson $(EXE) mkdir -p $(@D) $(EXE) --predictable-ids --no-source $< | jq --sort-keys --compact-output > $@ diff --unified <(jq "." $<.errors.ndjson) <(jq "." $@) -testdata/%.feature.source.ndjson: testdata/%.feature $(EXE) +testdata/%.feature.source.ndjson: ../testdata/%.feature $(EXE) ifdef GOLDEN mkdir -p $(@D) $(EXE) --predictable-ids --no-ast --no-pickles $< | jq --sort-keys --compact-output > $@ endif -acceptance/testdata/%.feature.source.ndjson: testdata/%.feature testdata/%.feature.source.ndjson $(EXE) +acceptance/testdata/%.feature.source.ndjson: ../testdata/%.feature ../testdata/%.feature.source.ndjson $(EXE) mkdir -p $(@D) $(EXE) --predictable-ids --no-ast --no-pickles $< | jq --sort-keys --compact-output > $@ diff --unified <(jq "." $<.source.ndjson) <(jq "." $@) -testdata/%.feature.pickles.ndjson: testdata/%.feature $(EXE) +testdata/%.feature.pickles.ndjson: ../testdata/%.feature $(EXE) ifdef GOLDEN mkdir -p $(@D) $(EXE) --predictable-ids --no-source --no-ast $< | jq --sort-keys --compact-output > $@ endif -acceptance/testdata/%.feature.pickles.ndjson: testdata/%.feature testdata/%.feature.pickles.ndjson $(EXE) +acceptance/testdata/%.feature.pickles.ndjson: ../testdata/%.feature ../testdata/%.feature.pickles.ndjson $(EXE) mkdir -p $(@D) $(EXE) --predictable-ids --no-source --no-ast $< | jq --sort-keys --compact-output > $@ diff --unified <(jq "." $<.pickles.ndjson) <(jq "." $@) diff --git a/vendor/github.com/cucumber/gherkin-go/v19/README.md b/vendor/github.com/cucumber/common/gherkin/go/v24/README.md similarity index 100% rename from vendor/github.com/cucumber/gherkin-go/v19/README.md rename to vendor/github.com/cucumber/common/gherkin/go/v24/README.md diff --git a/vendor/github.com/cucumber/gherkin-go/v19/astbuilder.go b/vendor/github.com/cucumber/common/gherkin/go/v24/astbuilder.go similarity index 98% rename from vendor/github.com/cucumber/gherkin-go/v19/astbuilder.go rename to vendor/github.com/cucumber/common/gherkin/go/v24/astbuilder.go index 6fbe9be..81decb5 100644 --- a/vendor/github.com/cucumber/gherkin-go/v19/astbuilder.go +++ b/vendor/github.com/cucumber/common/gherkin/go/v24/astbuilder.go @@ -1,7 +1,7 @@ package gherkin import ( - "github.com/cucumber/messages-go/v16" + "github.com/cucumber/common/messages/go/v19" "strings" ) @@ -140,10 +140,11 @@ func (t *astBuilder) transformNode(node *astNode) (interface{}, error) { stepLine := node.getToken(TokenTypeStepLine) step := &messages.Step{ - Location: astLocation(stepLine), - Keyword: stepLine.Keyword, - Text: stepLine.Text, - Id: t.newId(), + Location: astLocation(stepLine), + Keyword: stepLine.Keyword, + KeywordType: stepLine.KeywordType, + Text: stepLine.Text, + Id: t.newId(), } dataTable := node.getSingle(RuleTypeDataTable, nil) if dataTable != nil { diff --git a/vendor/github.com/cucumber/gherkin-go/v19/default.mk b/vendor/github.com/cucumber/common/gherkin/go/v24/default.mk similarity index 77% rename from vendor/github.com/cucumber/gherkin-go/v19/default.mk rename to vendor/github.com/cucumber/common/gherkin/go/v24/default.mk index 08a4e6c..d90e523 100644 --- a/vendor/github.com/cucumber/gherkin-go/v19/default.mk +++ b/vendor/github.com/cucumber/common/gherkin/go/v24/default.mk @@ -10,16 +10,14 @@ EXE_BASE_NAME := cucumber-$(LIBNAME) LDFLAGS := "-X main.version=${NEW_VERSION}" # Enumerating Cross compilation targets -PLATFORMS = darwin-amd64 linux-386 linux-amd64 linux-arm freebsd-386 freebsd-amd64 openbsd-386 openbsd-amd64 windows-386 windows-amd64 freebsd-arm netbsd-386 netbsd-amd64 netbsd-arm +PLATFORMS = darwin-amd64 linux-386 linux-amd64 linux-arm linux-arm64 freebsd-386 freebsd-amd64 openbsd-386 openbsd-amd64 windows-386 windows-amd64 freebsd-arm netbsd-386 netbsd-amd64 netbsd-arm PLATFORM = $(patsubst dist/$(EXE_BASE_NAME)-%,%,$@) OS_ARCH = $(subst -, ,$(PLATFORM)) X-OS = $(word 1, $(OS_ARCH)) X-ARCH = $(word 2, $(OS_ARCH)) -# Determine if we're on linux or osx (ignoring other OSes as we're not building on them) -OS := $(shell [[ "$$(uname)" == "Darwin" ]] && echo "darwin" || echo "linux") -# Determine if we're on 386 or amd64 (ignoring other processors as we're not building on them) -ARCH := $(shell [[ "$$(uname -m)" == "x86_64" ]] && echo "amd64" || echo "386") +OS := $(shell go env GOOS) +ARCH := $(shell go env GOARCH) EXE := dist/$(EXE_BASE_NAME)-$(OS)-$(ARCH) ifndef NO_CROSS_COMPILE @@ -28,8 +26,8 @@ else EXES = $(EXE) endif -GO_REPLACEMENTS := $(shell sed -n "/^\s*github.com\/cucumber/p" go.mod | perl -wpe 's/\s*(github.com\/cucumber\/(.*)-go\/v\d+).*/q{replace } . $$1 . q{ => ..\/..\/} . $$2 . q{\/go}/eg') -CURRENT_MAJOR := $(shell sed -n "/^module/p" go.mod | awk '{ print $$0 "/v1" }' | cut -d'/' -f4 | cut -d'v' -f2) +GO_REPLACEMENTS := $(shell sed -n "/^\s*github.com\/cucumber\/common/p" go.mod | perl -wpe 's/\s*(github.com\/cucumber\/common\/(.*)\/go\/v\d+).*/q{replace } . $$1 . q{ => ..\/..\/} . $$2 . q{\/go}/eg') +CURRENT_MAJOR := $(shell sed -n "/^module/p" go.mod | awk '{ print $$0 "/v1" }' | cut -d'/' -f6 | cut -d'v' -f2) NEW_MAJOR := $(shell echo ${NEW_VERSION} | awk -F'.' '{print $$1}') GO_MAJOR_V = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1) @@ -53,7 +51,7 @@ endif dist: $(EXES) -dist/$(EXE_BASE_NAME)-%: .deps $(GO_SOURCE_FILES) +dist/$(EXE_BASE_NAME)-%: .deps $(GO_SOURCE_FILES) go.mod mkdir -p dist echo "EXES=$(EXES)" echo "Building $@" @@ -102,7 +100,13 @@ else endif else publish: - # no-op +ifdef NEW_VERSION + git tag --sign "$(LIBNAME)/go/v$(NEW_VERSION)" -m "Release $(LIBNAME)/go v$(NEW_VERSION)" + git push --tags +else + @echo -e "\033[0;31mNEW_VERSION is not defined. Can't publish :-(\033[0m" + exit 1 +endif endif .PHONY: publish @@ -115,6 +119,14 @@ endif touch $@ post-release: add-replaces +ifdef NEW_VERSION + pushd ../.. && \ + source scripts/functions.sh && update_go_library_version $(LIBNAME) $(NEW_VERSION) && \ + popd +else + @echo -e "\033[0;31mNEW_VERSION is not defined. Can't post-release :-(\033[0m" + exit 1 +endif .PHONY: post-release clean: clean-go @@ -142,8 +154,8 @@ ifeq ($(CURRENT_MAJOR), $(NEW_MAJOR)) # echo "No major version change" else echo "Updating major from $(CURRENT_MAJOR) to $(NEW_MAJOR)" - sed -Ei "s/$(LIBNAME)-go(\/v$(CURRENT_MAJOR))?/$(LIBNAME)-go\/v$(NEW_MAJOR)/" go.mod - sed -Ei "s/$(LIBNAME)-go(\/v$(CURRENT_MAJOR))?/$(LIBNAME)-go\/v$(NEW_MAJOR)/" $(shell find . -name "*.go") + sed -Ei "s/$(LIBNAME)\/go(\/v$(CURRENT_MAJOR))?/$(LIBNAME)\/go\/v$(NEW_MAJOR)/" go.mod + sed -Ei "s/$(LIBNAME)\/go(\/v$(CURRENT_MAJOR))?/$(LIBNAME)\/go\/v$(NEW_MAJOR)/" $(shell find . -name "*.go") endif .PHONY: update-major diff --git a/vendor/github.com/cucumber/common/gherkin/go/v24/dialect.go b/vendor/github.com/cucumber/common/gherkin/go/v24/dialect.go new file mode 100644 index 0000000..caac04d --- /dev/null +++ b/vendor/github.com/cucumber/common/gherkin/go/v24/dialect.go @@ -0,0 +1,58 @@ +package gherkin + +import messages "github.com/cucumber/common/messages/go/v19" + +type Dialect struct { + Language string + Name string + Native string + Keywords map[string][]string + KeywordTypes map[string]messages.StepKeywordType +} + +func (g *Dialect) FeatureKeywords() []string { + return g.Keywords["feature"] +} + +func (g *Dialect) RuleKeywords() []string { + return g.Keywords["rule"] +} + +func (g *Dialect) ScenarioKeywords() []string { + return g.Keywords["scenario"] +} + +func (g *Dialect) StepKeywords() []string { + result := g.Keywords["given"] + result = append(result, g.Keywords["when"]...) + result = append(result, g.Keywords["then"]...) + result = append(result, g.Keywords["and"]...) + result = append(result, g.Keywords["but"]...) + return result +} + +func (g *Dialect) BackgroundKeywords() []string { + return g.Keywords["background"] +} + +func (g *Dialect) ScenarioOutlineKeywords() []string { + return g.Keywords["scenarioOutline"] +} + +func (g *Dialect) ExamplesKeywords() []string { + return g.Keywords["examples"] +} + +func (g *Dialect) StepKeywordType(keyword string) messages.StepKeywordType { + return g.KeywordTypes[keyword] +} + +type DialectProvider interface { + GetDialect(language string) *Dialect +} + +type gherkinDialectMap map[string]*Dialect + +func (g gherkinDialectMap) GetDialect(language string) *Dialect { + return g[language] +} diff --git a/vendor/github.com/cucumber/common/gherkin/go/v24/dialects_builtin.go b/vendor/github.com/cucumber/common/gherkin/go/v24/dialects_builtin.go new file mode 100644 index 0000000..ee3e7a2 --- /dev/null +++ b/vendor/github.com/cucumber/common/gherkin/go/v24/dialects_builtin.go @@ -0,0 +1,4843 @@ +package gherkin + +import messages "github.com/cucumber/common/messages/go/v19" + +// Builtin dialects for af (Afrikaans), am (Armenian), an (Aragonese), ar (Arabic), ast (Asturian), az (Azerbaijani), bg (Bulgarian), bm (Malay), bs (Bosnian), ca (Catalan), cs (Czech), cy-GB (Welsh), da (Danish), de (German), el (Greek), em (Emoji), en (English), en-Scouse (Scouse), en-au (Australian), en-lol (LOLCAT), en-old (Old English), en-pirate (Pirate), en-tx (Texas), eo (Esperanto), es (Spanish), et (Estonian), fa (Persian), fi (Finnish), fr (French), ga (Irish), gj (Gujarati), gl (Galician), he (Hebrew), hi (Hindi), hr (Croatian), ht (Creole), hu (Hungarian), id (Indonesian), is (Icelandic), it (Italian), ja (Japanese), jv (Javanese), ka (Georgian), kn (Kannada), ko (Korean), lt (Lithuanian), lu (Luxemburgish), lv (Latvian), mk-Cyrl (Macedonian), mk-Latn (Macedonian (Latin)), mn (Mongolian), ne (Nepali), nl (Dutch), no (Norwegian), pa (Panjabi), pl (Polish), pt (Portuguese), ro (Romanian), ru (Russian), sk (Slovak), sl (Slovenian), sr-Cyrl (Serbian), sr-Latn (Serbian (Latin)), sv (Swedish), ta (Tamil), th (Thai), te (Telugu), tlh (Klingon), tr (Turkish), tt (Tatar), uk (Ukrainian), ur (Urdu), uz (Uzbek), vi (Vietnamese), zh-CN (Chinese simplified), zh-TW (Chinese traditional), mr (Marathi) +func DialectsBuiltin() DialectProvider { + return builtinDialects +} + +const ( + feature = "feature" + rule = "rule" + background = "background" + scenario = "scenario" + scenarioOutline = "scenarioOutline" + examples = "examples" + given = "given" + when = "when" + then = "then" + and = "and" + but = "but" +) + +var builtinDialects = gherkinDialectMap{ + "af": &Dialect{ + "af", "Afrikaans", "Afrikaans", map[string][]string{ + feature: { + "Funksie", + "Besigheid Behoefte", + "Vermoë", + }, + rule: { + "Regel", + }, + background: { + "Agtergrond", + }, + scenario: { + "Voorbeeld", + "Situasie", + }, + scenarioOutline: { + "Situasie Uiteensetting", + }, + examples: { + "Voorbeelde", + }, + given: { + "* ", + "Gegewe ", + }, + when: { + "* ", + "Wanneer ", + }, + then: { + "* ", + "Dan ", + }, + and: { + "* ", + "En ", + }, + but: { + "* ", + "Maar ", + }, + }, + map[string]messages.StepKeywordType{ + "Gegewe ": messages.StepKeywordType_CONTEXT, + + "Wanneer ": messages.StepKeywordType_ACTION, + + "Dan ": messages.StepKeywordType_OUTCOME, + + "En ": messages.StepKeywordType_CONJUNCTION, + + "Maar ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "am": &Dialect{ + "am", "Armenian", "հայերեն", map[string][]string{ + feature: { + "Ֆունկցիոնալություն", + "Հատկություն", + }, + rule: { + "Rule", + }, + background: { + "Կոնտեքստ", + }, + scenario: { + "Օրինակ", + "Սցենար", + }, + scenarioOutline: { + "Սցենարի կառուցվացքը", + }, + examples: { + "Օրինակներ", + }, + given: { + "* ", + "Դիցուք ", + }, + when: { + "* ", + "Եթե ", + "Երբ ", + }, + then: { + "* ", + "Ապա ", + }, + and: { + "* ", + "Եվ ", + }, + but: { + "* ", + "Բայց ", + }, + }, + map[string]messages.StepKeywordType{ + "Դիցուք ": messages.StepKeywordType_CONTEXT, + + "Եթե ": messages.StepKeywordType_ACTION, + "Երբ ": messages.StepKeywordType_ACTION, + + "Ապա ": messages.StepKeywordType_OUTCOME, + + "Եվ ": messages.StepKeywordType_CONJUNCTION, + + "Բայց ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "an": &Dialect{ + "an", "Aragonese", "Aragonés", map[string][]string{ + feature: { + "Caracteristica", + }, + rule: { + "Rule", + }, + background: { + "Antecedents", + }, + scenario: { + "Eixemplo", + "Caso", + }, + scenarioOutline: { + "Esquema del caso", + }, + examples: { + "Eixemplos", + }, + given: { + "* ", + "Dau ", + "Dada ", + "Daus ", + "Dadas ", + }, + when: { + "* ", + "Cuan ", + }, + then: { + "* ", + "Alavez ", + "Allora ", + "Antonces ", + }, + and: { + "* ", + "Y ", + "E ", + }, + but: { + "* ", + "Pero ", + }, + }, + map[string]messages.StepKeywordType{ + "Dau ": messages.StepKeywordType_CONTEXT, + "Dada ": messages.StepKeywordType_CONTEXT, + "Daus ": messages.StepKeywordType_CONTEXT, + "Dadas ": messages.StepKeywordType_CONTEXT, + + "Cuan ": messages.StepKeywordType_ACTION, + + "Alavez ": messages.StepKeywordType_OUTCOME, + "Allora ": messages.StepKeywordType_OUTCOME, + "Antonces ": messages.StepKeywordType_OUTCOME, + + "Y ": messages.StepKeywordType_CONJUNCTION, + "E ": messages.StepKeywordType_CONJUNCTION, + + "Pero ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ar": &Dialect{ + "ar", "Arabic", "العربية", map[string][]string{ + feature: { + "خاصية", + }, + rule: { + "Rule", + }, + background: { + "الخلفية", + }, + scenario: { + "مثال", + "سيناريو", + }, + scenarioOutline: { + "سيناريو مخطط", + }, + examples: { + "امثلة", + }, + given: { + "* ", + "بفرض ", + }, + when: { + "* ", + "متى ", + "عندما ", + }, + then: { + "* ", + "اذاً ", + "ثم ", + }, + and: { + "* ", + "و ", + }, + but: { + "* ", + "لكن ", + }, + }, + map[string]messages.StepKeywordType{ + "بفرض ": messages.StepKeywordType_CONTEXT, + + "متى ": messages.StepKeywordType_ACTION, + "عندما ": messages.StepKeywordType_ACTION, + + "اذاً ": messages.StepKeywordType_OUTCOME, + "ثم ": messages.StepKeywordType_OUTCOME, + + "و ": messages.StepKeywordType_CONJUNCTION, + + "لكن ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ast": &Dialect{ + "ast", "Asturian", "asturianu", map[string][]string{ + feature: { + "Carauterística", + }, + rule: { + "Rule", + }, + background: { + "Antecedentes", + }, + scenario: { + "Exemplo", + "Casu", + }, + scenarioOutline: { + "Esbozu del casu", + }, + examples: { + "Exemplos", + }, + given: { + "* ", + "Dáu ", + "Dada ", + "Daos ", + "Daes ", + }, + when: { + "* ", + "Cuando ", + }, + then: { + "* ", + "Entós ", + }, + and: { + "* ", + "Y ", + "Ya ", + }, + but: { + "* ", + "Peru ", + }, + }, + map[string]messages.StepKeywordType{ + "Dáu ": messages.StepKeywordType_CONTEXT, + "Dada ": messages.StepKeywordType_CONTEXT, + "Daos ": messages.StepKeywordType_CONTEXT, + "Daes ": messages.StepKeywordType_CONTEXT, + + "Cuando ": messages.StepKeywordType_ACTION, + + "Entós ": messages.StepKeywordType_OUTCOME, + + "Y ": messages.StepKeywordType_CONJUNCTION, + "Ya ": messages.StepKeywordType_CONJUNCTION, + + "Peru ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "az": &Dialect{ + "az", "Azerbaijani", "Azərbaycanca", map[string][]string{ + feature: { + "Özəllik", + }, + rule: { + "Rule", + }, + background: { + "Keçmiş", + "Kontekst", + }, + scenario: { + "Nümunə", + "Ssenari", + }, + scenarioOutline: { + "Ssenarinin strukturu", + }, + examples: { + "Nümunələr", + }, + given: { + "* ", + "Tutaq ki ", + "Verilir ", + }, + when: { + "* ", + "Əgər ", + "Nə vaxt ki ", + }, + then: { + "* ", + "O halda ", + }, + and: { + "* ", + "Və ", + "Həm ", + }, + but: { + "* ", + "Amma ", + "Ancaq ", + }, + }, + map[string]messages.StepKeywordType{ + "Tutaq ki ": messages.StepKeywordType_CONTEXT, + "Verilir ": messages.StepKeywordType_CONTEXT, + + "Əgər ": messages.StepKeywordType_ACTION, + "Nə vaxt ki ": messages.StepKeywordType_ACTION, + + "O halda ": messages.StepKeywordType_OUTCOME, + + "Və ": messages.StepKeywordType_CONJUNCTION, + "Həm ": messages.StepKeywordType_CONJUNCTION, + + "Amma ": messages.StepKeywordType_CONJUNCTION, + "Ancaq ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "bg": &Dialect{ + "bg", "Bulgarian", "български", map[string][]string{ + feature: { + "Функционалност", + }, + rule: { + "Правило", + }, + background: { + "Предистория", + }, + scenario: { + "Пример", + "Сценарий", + }, + scenarioOutline: { + "Рамка на сценарий", + }, + examples: { + "Примери", + }, + given: { + "* ", + "Дадено ", + }, + when: { + "* ", + "Когато ", + }, + then: { + "* ", + "То ", + }, + and: { + "* ", + "И ", + }, + but: { + "* ", + "Но ", + }, + }, + map[string]messages.StepKeywordType{ + "Дадено ": messages.StepKeywordType_CONTEXT, + + "Когато ": messages.StepKeywordType_ACTION, + + "То ": messages.StepKeywordType_OUTCOME, + + "И ": messages.StepKeywordType_CONJUNCTION, + + "Но ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "bm": &Dialect{ + "bm", "Malay", "Bahasa Melayu", map[string][]string{ + feature: { + "Fungsi", + }, + rule: { + "Rule", + }, + background: { + "Latar Belakang", + }, + scenario: { + "Senario", + "Situasi", + "Keadaan", + }, + scenarioOutline: { + "Kerangka Senario", + "Kerangka Situasi", + "Kerangka Keadaan", + "Garis Panduan Senario", + }, + examples: { + "Contoh", + }, + given: { + "* ", + "Diberi ", + "Bagi ", + }, + when: { + "* ", + "Apabila ", + }, + then: { + "* ", + "Maka ", + "Kemudian ", + }, + and: { + "* ", + "Dan ", + }, + but: { + "* ", + "Tetapi ", + "Tapi ", + }, + }, + map[string]messages.StepKeywordType{ + "Diberi ": messages.StepKeywordType_CONTEXT, + "Bagi ": messages.StepKeywordType_CONTEXT, + + "Apabila ": messages.StepKeywordType_ACTION, + + "Maka ": messages.StepKeywordType_OUTCOME, + "Kemudian ": messages.StepKeywordType_OUTCOME, + + "Dan ": messages.StepKeywordType_CONJUNCTION, + + "Tetapi ": messages.StepKeywordType_CONJUNCTION, + "Tapi ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "bs": &Dialect{ + "bs", "Bosnian", "Bosanski", map[string][]string{ + feature: { + "Karakteristika", + }, + rule: { + "Rule", + }, + background: { + "Pozadina", + }, + scenario: { + "Primjer", + "Scenariju", + "Scenario", + }, + scenarioOutline: { + "Scenariju-obris", + "Scenario-outline", + }, + examples: { + "Primjeri", + }, + given: { + "* ", + "Dato ", + }, + when: { + "* ", + "Kada ", + }, + then: { + "* ", + "Zatim ", + }, + and: { + "* ", + "I ", + "A ", + }, + but: { + "* ", + "Ali ", + }, + }, + map[string]messages.StepKeywordType{ + "Dato ": messages.StepKeywordType_CONTEXT, + + "Kada ": messages.StepKeywordType_ACTION, + + "Zatim ": messages.StepKeywordType_OUTCOME, + + "I ": messages.StepKeywordType_CONJUNCTION, + "A ": messages.StepKeywordType_CONJUNCTION, + + "Ali ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ca": &Dialect{ + "ca", "Catalan", "català", map[string][]string{ + feature: { + "Característica", + "Funcionalitat", + }, + rule: { + "Rule", + }, + background: { + "Rerefons", + "Antecedents", + }, + scenario: { + "Exemple", + "Escenari", + }, + scenarioOutline: { + "Esquema de l'escenari", + }, + examples: { + "Exemples", + }, + given: { + "* ", + "Donat ", + "Donada ", + "Atès ", + "Atesa ", + }, + when: { + "* ", + "Quan ", + }, + then: { + "* ", + "Aleshores ", + "Cal ", + }, + and: { + "* ", + "I ", + }, + but: { + "* ", + "Però ", + }, + }, + map[string]messages.StepKeywordType{ + "Donat ": messages.StepKeywordType_CONTEXT, + "Donada ": messages.StepKeywordType_CONTEXT, + "Atès ": messages.StepKeywordType_CONTEXT, + "Atesa ": messages.StepKeywordType_CONTEXT, + + "Quan ": messages.StepKeywordType_ACTION, + + "Aleshores ": messages.StepKeywordType_OUTCOME, + "Cal ": messages.StepKeywordType_OUTCOME, + + "I ": messages.StepKeywordType_CONJUNCTION, + + "Però ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "cs": &Dialect{ + "cs", "Czech", "Česky", map[string][]string{ + feature: { + "Požadavek", + }, + rule: { + "Pravidlo", + }, + background: { + "Pozadí", + "Kontext", + }, + scenario: { + "Příklad", + "Scénář", + }, + scenarioOutline: { + "Náčrt Scénáře", + "Osnova scénáře", + }, + examples: { + "Příklady", + }, + given: { + "* ", + "Pokud ", + "Za předpokladu ", + }, + when: { + "* ", + "Když ", + }, + then: { + "* ", + "Pak ", + }, + and: { + "* ", + "A také ", + "A ", + }, + but: { + "* ", + "Ale ", + }, + }, + map[string]messages.StepKeywordType{ + "Pokud ": messages.StepKeywordType_CONTEXT, + "Za předpokladu ": messages.StepKeywordType_CONTEXT, + + "Když ": messages.StepKeywordType_ACTION, + + "Pak ": messages.StepKeywordType_OUTCOME, + + "A také ": messages.StepKeywordType_CONJUNCTION, + "A ": messages.StepKeywordType_CONJUNCTION, + + "Ale ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "cy-GB": &Dialect{ + "cy-GB", "Welsh", "Cymraeg", map[string][]string{ + feature: { + "Arwedd", + }, + rule: { + "Rule", + }, + background: { + "Cefndir", + }, + scenario: { + "Enghraifft", + "Scenario", + }, + scenarioOutline: { + "Scenario Amlinellol", + }, + examples: { + "Enghreifftiau", + }, + given: { + "* ", + "Anrhegedig a ", + }, + when: { + "* ", + "Pryd ", + }, + then: { + "* ", + "Yna ", + }, + and: { + "* ", + "A ", + }, + but: { + "* ", + "Ond ", + }, + }, + map[string]messages.StepKeywordType{ + "Anrhegedig a ": messages.StepKeywordType_CONTEXT, + + "Pryd ": messages.StepKeywordType_ACTION, + + "Yna ": messages.StepKeywordType_OUTCOME, + + "A ": messages.StepKeywordType_CONJUNCTION, + + "Ond ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "da": &Dialect{ + "da", "Danish", "dansk", map[string][]string{ + feature: { + "Egenskab", + }, + rule: { + "Rule", + }, + background: { + "Baggrund", + }, + scenario: { + "Eksempel", + "Scenarie", + }, + scenarioOutline: { + "Abstrakt Scenario", + }, + examples: { + "Eksempler", + }, + given: { + "* ", + "Givet ", + }, + when: { + "* ", + "Når ", + }, + then: { + "* ", + "Så ", + }, + and: { + "* ", + "Og ", + }, + but: { + "* ", + "Men ", + }, + }, + map[string]messages.StepKeywordType{ + "Givet ": messages.StepKeywordType_CONTEXT, + + "Når ": messages.StepKeywordType_ACTION, + + "Så ": messages.StepKeywordType_OUTCOME, + + "Og ": messages.StepKeywordType_CONJUNCTION, + + "Men ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "de": &Dialect{ + "de", "German", "Deutsch", map[string][]string{ + feature: { + "Funktionalität", + "Funktion", + }, + rule: { + "Rule", + "Regel", + }, + background: { + "Grundlage", + "Hintergrund", + "Voraussetzungen", + "Vorbedingungen", + }, + scenario: { + "Beispiel", + "Szenario", + }, + scenarioOutline: { + "Szenariogrundriss", + "Szenarien", + }, + examples: { + "Beispiele", + }, + given: { + "* ", + "Angenommen ", + "Gegeben sei ", + "Gegeben seien ", + }, + when: { + "* ", + "Wenn ", + }, + then: { + "* ", + "Dann ", + }, + and: { + "* ", + "Und ", + }, + but: { + "* ", + "Aber ", + }, + }, + map[string]messages.StepKeywordType{ + "Angenommen ": messages.StepKeywordType_CONTEXT, + "Gegeben sei ": messages.StepKeywordType_CONTEXT, + "Gegeben seien ": messages.StepKeywordType_CONTEXT, + + "Wenn ": messages.StepKeywordType_ACTION, + + "Dann ": messages.StepKeywordType_OUTCOME, + + "Und ": messages.StepKeywordType_CONJUNCTION, + + "Aber ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "el": &Dialect{ + "el", "Greek", "Ελληνικά", map[string][]string{ + feature: { + "Δυνατότητα", + "Λειτουργία", + }, + rule: { + "Rule", + }, + background: { + "Υπόβαθρο", + }, + scenario: { + "Παράδειγμα", + "Σενάριο", + }, + scenarioOutline: { + "Περιγραφή Σεναρίου", + "Περίγραμμα Σεναρίου", + }, + examples: { + "Παραδείγματα", + "Σενάρια", + }, + given: { + "* ", + "Δεδομένου ", + }, + when: { + "* ", + "Όταν ", + }, + then: { + "* ", + "Τότε ", + }, + and: { + "* ", + "Και ", + }, + but: { + "* ", + "Αλλά ", + }, + }, + map[string]messages.StepKeywordType{ + "Δεδομένου ": messages.StepKeywordType_CONTEXT, + + "Όταν ": messages.StepKeywordType_ACTION, + + "Τότε ": messages.StepKeywordType_OUTCOME, + + "Και ": messages.StepKeywordType_CONJUNCTION, + + "Αλλά ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "em": &Dialect{ + "em", "Emoji", "😀", map[string][]string{ + feature: { + "📚", + }, + rule: { + "Rule", + }, + background: { + "💤", + }, + scenario: { + "🥒", + "📕", + }, + scenarioOutline: { + "📖", + }, + examples: { + "📓", + }, + given: { + "* ", + "😐", + }, + when: { + "* ", + "🎬", + }, + then: { + "* ", + "🙏", + }, + and: { + "* ", + "😂", + }, + but: { + "* ", + "😔", + }, + }, + map[string]messages.StepKeywordType{ + "😐": messages.StepKeywordType_CONTEXT, + + "🎬": messages.StepKeywordType_ACTION, + + "🙏": messages.StepKeywordType_OUTCOME, + + "😂": messages.StepKeywordType_CONJUNCTION, + + "😔": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "en": &Dialect{ + "en", "English", "English", map[string][]string{ + feature: { + "Feature", + "Business Need", + "Ability", + }, + rule: { + "Rule", + }, + background: { + "Background", + }, + scenario: { + "Example", + "Scenario", + }, + scenarioOutline: { + "Scenario Outline", + "Scenario Template", + }, + examples: { + "Examples", + "Scenarios", + }, + given: { + "* ", + "Given ", + }, + when: { + "* ", + "When ", + }, + then: { + "* ", + "Then ", + }, + and: { + "* ", + "And ", + }, + but: { + "* ", + "But ", + }, + }, + map[string]messages.StepKeywordType{ + "Given ": messages.StepKeywordType_CONTEXT, + + "When ": messages.StepKeywordType_ACTION, + + "Then ": messages.StepKeywordType_OUTCOME, + + "And ": messages.StepKeywordType_CONJUNCTION, + + "But ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "en-Scouse": &Dialect{ + "en-Scouse", "Scouse", "Scouse", map[string][]string{ + feature: { + "Feature", + }, + rule: { + "Rule", + }, + background: { + "Dis is what went down", + }, + scenario: { + "The thing of it is", + }, + scenarioOutline: { + "Wharrimean is", + }, + examples: { + "Examples", + }, + given: { + "* ", + "Givun ", + "Youse know when youse got ", + }, + when: { + "* ", + "Wun ", + "Youse know like when ", + }, + then: { + "* ", + "Dun ", + "Den youse gotta ", + }, + and: { + "* ", + "An ", + }, + but: { + "* ", + "Buh ", + }, + }, + map[string]messages.StepKeywordType{ + "Givun ": messages.StepKeywordType_CONTEXT, + "Youse know when youse got ": messages.StepKeywordType_CONTEXT, + + "Wun ": messages.StepKeywordType_ACTION, + "Youse know like when ": messages.StepKeywordType_ACTION, + + "Dun ": messages.StepKeywordType_OUTCOME, + "Den youse gotta ": messages.StepKeywordType_OUTCOME, + + "An ": messages.StepKeywordType_CONJUNCTION, + + "Buh ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "en-au": &Dialect{ + "en-au", "Australian", "Australian", map[string][]string{ + feature: { + "Pretty much", + }, + rule: { + "Rule", + }, + background: { + "First off", + }, + scenario: { + "Awww, look mate", + }, + scenarioOutline: { + "Reckon it's like", + }, + examples: { + "You'll wanna", + }, + given: { + "* ", + "Y'know ", + }, + when: { + "* ", + "It's just unbelievable ", + }, + then: { + "* ", + "But at the end of the day I reckon ", + }, + and: { + "* ", + "Too right ", + }, + but: { + "* ", + "Yeah nah ", + }, + }, + map[string]messages.StepKeywordType{ + "Y'know ": messages.StepKeywordType_CONTEXT, + + "It's just unbelievable ": messages.StepKeywordType_ACTION, + + "But at the end of the day I reckon ": messages.StepKeywordType_OUTCOME, + + "Too right ": messages.StepKeywordType_CONJUNCTION, + + "Yeah nah ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "en-lol": &Dialect{ + "en-lol", "LOLCAT", "LOLCAT", map[string][]string{ + feature: { + "OH HAI", + }, + rule: { + "Rule", + }, + background: { + "B4", + }, + scenario: { + "MISHUN", + }, + scenarioOutline: { + "MISHUN SRSLY", + }, + examples: { + "EXAMPLZ", + }, + given: { + "* ", + "I CAN HAZ ", + }, + when: { + "* ", + "WEN ", + }, + then: { + "* ", + "DEN ", + }, + and: { + "* ", + "AN ", + }, + but: { + "* ", + "BUT ", + }, + }, + map[string]messages.StepKeywordType{ + "I CAN HAZ ": messages.StepKeywordType_CONTEXT, + + "WEN ": messages.StepKeywordType_ACTION, + + "DEN ": messages.StepKeywordType_OUTCOME, + + "AN ": messages.StepKeywordType_CONJUNCTION, + + "BUT ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "en-old": &Dialect{ + "en-old", "Old English", "Englisc", map[string][]string{ + feature: { + "Hwaet", + "Hwæt", + }, + rule: { + "Rule", + }, + background: { + "Aer", + "Ær", + }, + scenario: { + "Swa", + }, + scenarioOutline: { + "Swa hwaer swa", + "Swa hwær swa", + }, + examples: { + "Se the", + "Se þe", + "Se ðe", + }, + given: { + "* ", + "Thurh ", + "Þurh ", + "Ðurh ", + }, + when: { + "* ", + "Bæþsealf ", + "Bæþsealfa ", + "Bæþsealfe ", + "Ciricæw ", + "Ciricæwe ", + "Ciricæwa ", + }, + then: { + "* ", + "Tha ", + "Þa ", + "Ða ", + "Tha the ", + "Þa þe ", + "Ða ðe ", + }, + and: { + "* ", + "Ond ", + "7 ", + }, + but: { + "* ", + "Ac ", + }, + }, + map[string]messages.StepKeywordType{ + "Thurh ": messages.StepKeywordType_CONTEXT, + "Þurh ": messages.StepKeywordType_CONTEXT, + "Ðurh ": messages.StepKeywordType_CONTEXT, + + "Bæþsealf ": messages.StepKeywordType_ACTION, + "Bæþsealfa ": messages.StepKeywordType_ACTION, + "Bæþsealfe ": messages.StepKeywordType_ACTION, + "Ciricæw ": messages.StepKeywordType_ACTION, + "Ciricæwe ": messages.StepKeywordType_ACTION, + "Ciricæwa ": messages.StepKeywordType_ACTION, + + "Tha ": messages.StepKeywordType_OUTCOME, + "Þa ": messages.StepKeywordType_OUTCOME, + "Ða ": messages.StepKeywordType_OUTCOME, + "Tha the ": messages.StepKeywordType_OUTCOME, + "Þa þe ": messages.StepKeywordType_OUTCOME, + "Ða ðe ": messages.StepKeywordType_OUTCOME, + + "Ond ": messages.StepKeywordType_CONJUNCTION, + "7 ": messages.StepKeywordType_CONJUNCTION, + + "Ac ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "en-pirate": &Dialect{ + "en-pirate", "Pirate", "Pirate", map[string][]string{ + feature: { + "Ahoy matey!", + }, + rule: { + "Rule", + }, + background: { + "Yo-ho-ho", + }, + scenario: { + "Heave to", + }, + scenarioOutline: { + "Shiver me timbers", + }, + examples: { + "Dead men tell no tales", + }, + given: { + "* ", + "Gangway! ", + }, + when: { + "* ", + "Blimey! ", + }, + then: { + "* ", + "Let go and haul ", + }, + and: { + "* ", + "Aye ", + }, + but: { + "* ", + "Avast! ", + }, + }, + map[string]messages.StepKeywordType{ + "Gangway! ": messages.StepKeywordType_CONTEXT, + + "Blimey! ": messages.StepKeywordType_ACTION, + + "Let go and haul ": messages.StepKeywordType_OUTCOME, + + "Aye ": messages.StepKeywordType_CONJUNCTION, + + "Avast! ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "en-tx": &Dialect{ + "en-tx", "Texas", "Texas", map[string][]string{ + feature: { + "This ain’t my first rodeo", + "All gussied up", + }, + rule: { + "Rule ", + }, + background: { + "Lemme tell y'all a story", + }, + scenario: { + "All hat and no cattle", + }, + scenarioOutline: { + "Serious as a snake bite", + "Busy as a hound in flea season", + }, + examples: { + "Now that's a story longer than a cattle drive in July", + }, + given: { + "Fixin' to ", + "All git out ", + }, + when: { + "Quick out of the chute ", + }, + then: { + "There’s no tree but bears some fruit ", + }, + and: { + "Come hell or high water ", + }, + but: { + "Well now hold on, I'll you what ", + }, + }, + map[string]messages.StepKeywordType{ + "Fixin' to ": messages.StepKeywordType_CONTEXT, + "All git out ": messages.StepKeywordType_CONTEXT, + + "Quick out of the chute ": messages.StepKeywordType_ACTION, + + "There’s no tree but bears some fruit ": messages.StepKeywordType_OUTCOME, + + "Come hell or high water ": messages.StepKeywordType_CONJUNCTION, + + "Well now hold on, I'll you what ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "eo": &Dialect{ + "eo", "Esperanto", "Esperanto", map[string][]string{ + feature: { + "Trajto", + }, + rule: { + "Rule", + }, + background: { + "Fono", + }, + scenario: { + "Ekzemplo", + "Scenaro", + "Kazo", + }, + scenarioOutline: { + "Konturo de la scenaro", + "Skizo", + "Kazo-skizo", + }, + examples: { + "Ekzemploj", + }, + given: { + "* ", + "Donitaĵo ", + "Komence ", + }, + when: { + "* ", + "Se ", + }, + then: { + "* ", + "Do ", + }, + and: { + "* ", + "Kaj ", + }, + but: { + "* ", + "Sed ", + }, + }, + map[string]messages.StepKeywordType{ + "Donitaĵo ": messages.StepKeywordType_CONTEXT, + "Komence ": messages.StepKeywordType_CONTEXT, + + "Se ": messages.StepKeywordType_ACTION, + + "Do ": messages.StepKeywordType_OUTCOME, + + "Kaj ": messages.StepKeywordType_CONJUNCTION, + + "Sed ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "es": &Dialect{ + "es", "Spanish", "español", map[string][]string{ + feature: { + "Característica", + "Necesidad del negocio", + "Requisito", + }, + rule: { + "Regla", + "Regla de negocio", + }, + background: { + "Antecedentes", + }, + scenario: { + "Ejemplo", + "Escenario", + }, + scenarioOutline: { + "Esquema del escenario", + }, + examples: { + "Ejemplos", + }, + given: { + "* ", + "Dado ", + "Dada ", + "Dados ", + "Dadas ", + }, + when: { + "* ", + "Cuando ", + }, + then: { + "* ", + "Entonces ", + }, + and: { + "* ", + "Y ", + "E ", + }, + but: { + "* ", + "Pero ", + }, + }, + map[string]messages.StepKeywordType{ + "Dado ": messages.StepKeywordType_CONTEXT, + "Dada ": messages.StepKeywordType_CONTEXT, + "Dados ": messages.StepKeywordType_CONTEXT, + "Dadas ": messages.StepKeywordType_CONTEXT, + + "Cuando ": messages.StepKeywordType_ACTION, + + "Entonces ": messages.StepKeywordType_OUTCOME, + + "Y ": messages.StepKeywordType_CONJUNCTION, + "E ": messages.StepKeywordType_CONJUNCTION, + + "Pero ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "et": &Dialect{ + "et", "Estonian", "eesti keel", map[string][]string{ + feature: { + "Omadus", + }, + rule: { + "Reegel", + }, + background: { + "Taust", + }, + scenario: { + "Juhtum", + "Stsenaarium", + }, + scenarioOutline: { + "Raamjuhtum", + "Raamstsenaarium", + }, + examples: { + "Juhtumid", + }, + given: { + "* ", + "Eeldades ", + }, + when: { + "* ", + "Kui ", + }, + then: { + "* ", + "Siis ", + }, + and: { + "* ", + "Ja ", + }, + but: { + "* ", + "Kuid ", + }, + }, + map[string]messages.StepKeywordType{ + "Eeldades ": messages.StepKeywordType_CONTEXT, + + "Kui ": messages.StepKeywordType_ACTION, + + "Siis ": messages.StepKeywordType_OUTCOME, + + "Ja ": messages.StepKeywordType_CONJUNCTION, + + "Kuid ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "fa": &Dialect{ + "fa", "Persian", "فارسی", map[string][]string{ + feature: { + "وِیژگی", + }, + rule: { + "Rule", + }, + background: { + "زمینه", + }, + scenario: { + "مثال", + "سناریو", + }, + scenarioOutline: { + "الگوی سناریو", + }, + examples: { + "نمونه ها", + }, + given: { + "* ", + "با فرض ", + }, + when: { + "* ", + "هنگامی ", + }, + then: { + "* ", + "آنگاه ", + }, + and: { + "* ", + "و ", + }, + but: { + "* ", + "اما ", + }, + }, + map[string]messages.StepKeywordType{ + "با فرض ": messages.StepKeywordType_CONTEXT, + + "هنگامی ": messages.StepKeywordType_ACTION, + + "آنگاه ": messages.StepKeywordType_OUTCOME, + + "و ": messages.StepKeywordType_CONJUNCTION, + + "اما ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "fi": &Dialect{ + "fi", "Finnish", "suomi", map[string][]string{ + feature: { + "Ominaisuus", + }, + rule: { + "Rule", + }, + background: { + "Tausta", + }, + scenario: { + "Tapaus", + }, + scenarioOutline: { + "Tapausaihio", + }, + examples: { + "Tapaukset", + }, + given: { + "* ", + "Oletetaan ", + }, + when: { + "* ", + "Kun ", + }, + then: { + "* ", + "Niin ", + }, + and: { + "* ", + "Ja ", + }, + but: { + "* ", + "Mutta ", + }, + }, + map[string]messages.StepKeywordType{ + "Oletetaan ": messages.StepKeywordType_CONTEXT, + + "Kun ": messages.StepKeywordType_ACTION, + + "Niin ": messages.StepKeywordType_OUTCOME, + + "Ja ": messages.StepKeywordType_CONJUNCTION, + + "Mutta ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "fr": &Dialect{ + "fr", "French", "français", map[string][]string{ + feature: { + "Fonctionnalité", + }, + rule: { + "Règle", + }, + background: { + "Contexte", + }, + scenario: { + "Exemple", + "Scénario", + }, + scenarioOutline: { + "Plan du scénario", + "Plan du Scénario", + }, + examples: { + "Exemples", + }, + given: { + "* ", + "Soit ", + "Sachant que ", + "Sachant qu'", + "Sachant ", + "Etant donné que ", + "Etant donné qu'", + "Etant donné ", + "Etant donnée ", + "Etant donnés ", + "Etant données ", + "Étant donné que ", + "Étant donné qu'", + "Étant donné ", + "Étant donnée ", + "Étant donnés ", + "Étant données ", + }, + when: { + "* ", + "Quand ", + "Lorsque ", + "Lorsqu'", + }, + then: { + "* ", + "Alors ", + "Donc ", + }, + and: { + "* ", + "Et que ", + "Et qu'", + "Et ", + }, + but: { + "* ", + "Mais que ", + "Mais qu'", + "Mais ", + }, + }, + map[string]messages.StepKeywordType{ + "Soit ": messages.StepKeywordType_CONTEXT, + "Sachant que ": messages.StepKeywordType_CONTEXT, + "Sachant qu'": messages.StepKeywordType_CONTEXT, + "Sachant ": messages.StepKeywordType_CONTEXT, + "Etant donné que ": messages.StepKeywordType_CONTEXT, + "Etant donné qu'": messages.StepKeywordType_CONTEXT, + "Etant donné ": messages.StepKeywordType_CONTEXT, + "Etant donnée ": messages.StepKeywordType_CONTEXT, + "Etant donnés ": messages.StepKeywordType_CONTEXT, + "Etant données ": messages.StepKeywordType_CONTEXT, + "Étant donné que ": messages.StepKeywordType_CONTEXT, + "Étant donné qu'": messages.StepKeywordType_CONTEXT, + "Étant donné ": messages.StepKeywordType_CONTEXT, + "Étant donnée ": messages.StepKeywordType_CONTEXT, + "Étant donnés ": messages.StepKeywordType_CONTEXT, + "Étant données ": messages.StepKeywordType_CONTEXT, + + "Quand ": messages.StepKeywordType_ACTION, + "Lorsque ": messages.StepKeywordType_ACTION, + "Lorsqu'": messages.StepKeywordType_ACTION, + + "Alors ": messages.StepKeywordType_OUTCOME, + "Donc ": messages.StepKeywordType_OUTCOME, + + "Et que ": messages.StepKeywordType_CONJUNCTION, + "Et qu'": messages.StepKeywordType_CONJUNCTION, + "Et ": messages.StepKeywordType_CONJUNCTION, + + "Mais que ": messages.StepKeywordType_CONJUNCTION, + "Mais qu'": messages.StepKeywordType_CONJUNCTION, + "Mais ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ga": &Dialect{ + "ga", "Irish", "Gaeilge", map[string][]string{ + feature: { + "Gné", + }, + rule: { + "Rule", + }, + background: { + "Cúlra", + }, + scenario: { + "Sampla", + "Cás", + }, + scenarioOutline: { + "Cás Achomair", + }, + examples: { + "Samplaí", + }, + given: { + "* ", + "Cuir i gcás go", + "Cuir i gcás nach", + "Cuir i gcás gur", + "Cuir i gcás nár", + }, + when: { + "* ", + "Nuair a", + "Nuair nach", + "Nuair ba", + "Nuair nár", + }, + then: { + "* ", + "Ansin", + }, + and: { + "* ", + "Agus", + }, + but: { + "* ", + "Ach", + }, + }, + map[string]messages.StepKeywordType{ + "Cuir i gcás go": messages.StepKeywordType_CONTEXT, + "Cuir i gcás nach": messages.StepKeywordType_CONTEXT, + "Cuir i gcás gur": messages.StepKeywordType_CONTEXT, + "Cuir i gcás nár": messages.StepKeywordType_CONTEXT, + + "Nuair a": messages.StepKeywordType_ACTION, + "Nuair nach": messages.StepKeywordType_ACTION, + "Nuair ba": messages.StepKeywordType_ACTION, + "Nuair nár": messages.StepKeywordType_ACTION, + + "Ansin": messages.StepKeywordType_OUTCOME, + + "Agus": messages.StepKeywordType_CONJUNCTION, + + "Ach": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "gj": &Dialect{ + "gj", "Gujarati", "ગુજરાતી", map[string][]string{ + feature: { + "લક્ષણ", + "વ્યાપાર જરૂર", + "ક્ષમતા", + }, + rule: { + "Rule", + }, + background: { + "બેકગ્રાઉન્ડ", + }, + scenario: { + "ઉદાહરણ", + "સ્થિતિ", + }, + scenarioOutline: { + "પરિદ્દશ્ય રૂપરેખા", + "પરિદ્દશ્ય ઢાંચો", + }, + examples: { + "ઉદાહરણો", + }, + given: { + "* ", + "આપેલ છે ", + }, + when: { + "* ", + "ક્યારે ", + }, + then: { + "* ", + "પછી ", + }, + and: { + "* ", + "અને ", + }, + but: { + "* ", + "પણ ", + }, + }, + map[string]messages.StepKeywordType{ + "આપેલ છે ": messages.StepKeywordType_CONTEXT, + + "ક્યારે ": messages.StepKeywordType_ACTION, + + "પછી ": messages.StepKeywordType_OUTCOME, + + "અને ": messages.StepKeywordType_CONJUNCTION, + + "પણ ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "gl": &Dialect{ + "gl", "Galician", "galego", map[string][]string{ + feature: { + "Característica", + }, + rule: { + "Rule", + }, + background: { + "Contexto", + }, + scenario: { + "Exemplo", + "Escenario", + }, + scenarioOutline: { + "Esbozo do escenario", + }, + examples: { + "Exemplos", + }, + given: { + "* ", + "Dado ", + "Dada ", + "Dados ", + "Dadas ", + }, + when: { + "* ", + "Cando ", + }, + then: { + "* ", + "Entón ", + "Logo ", + }, + and: { + "* ", + "E ", + }, + but: { + "* ", + "Mais ", + "Pero ", + }, + }, + map[string]messages.StepKeywordType{ + "Dado ": messages.StepKeywordType_CONTEXT, + "Dada ": messages.StepKeywordType_CONTEXT, + "Dados ": messages.StepKeywordType_CONTEXT, + "Dadas ": messages.StepKeywordType_CONTEXT, + + "Cando ": messages.StepKeywordType_ACTION, + + "Entón ": messages.StepKeywordType_OUTCOME, + "Logo ": messages.StepKeywordType_OUTCOME, + + "E ": messages.StepKeywordType_CONJUNCTION, + + "Mais ": messages.StepKeywordType_CONJUNCTION, + "Pero ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "he": &Dialect{ + "he", "Hebrew", "עברית", map[string][]string{ + feature: { + "תכונה", + }, + rule: { + "כלל", + }, + background: { + "רקע", + }, + scenario: { + "דוגמא", + "תרחיש", + }, + scenarioOutline: { + "תבנית תרחיש", + }, + examples: { + "דוגמאות", + }, + given: { + "* ", + "בהינתן ", + }, + when: { + "* ", + "כאשר ", + }, + then: { + "* ", + "אז ", + "אזי ", + }, + and: { + "* ", + "וגם ", + }, + but: { + "* ", + "אבל ", + }, + }, + map[string]messages.StepKeywordType{ + "בהינתן ": messages.StepKeywordType_CONTEXT, + + "כאשר ": messages.StepKeywordType_ACTION, + + "אז ": messages.StepKeywordType_OUTCOME, + "אזי ": messages.StepKeywordType_OUTCOME, + + "וגם ": messages.StepKeywordType_CONJUNCTION, + + "אבל ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "hi": &Dialect{ + "hi", "Hindi", "हिंदी", map[string][]string{ + feature: { + "रूप लेख", + }, + rule: { + "नियम", + }, + background: { + "पृष्ठभूमि", + }, + scenario: { + "परिदृश्य", + }, + scenarioOutline: { + "परिदृश्य रूपरेखा", + }, + examples: { + "उदाहरण", + }, + given: { + "* ", + "अगर ", + "यदि ", + "चूंकि ", + }, + when: { + "* ", + "जब ", + "कदा ", + }, + then: { + "* ", + "तब ", + "तदा ", + }, + and: { + "* ", + "और ", + "तथा ", + }, + but: { + "* ", + "पर ", + "परन्तु ", + "किन्तु ", + }, + }, + map[string]messages.StepKeywordType{ + "अगर ": messages.StepKeywordType_CONTEXT, + "यदि ": messages.StepKeywordType_CONTEXT, + "चूंकि ": messages.StepKeywordType_CONTEXT, + + "जब ": messages.StepKeywordType_ACTION, + "कदा ": messages.StepKeywordType_ACTION, + + "तब ": messages.StepKeywordType_OUTCOME, + "तदा ": messages.StepKeywordType_OUTCOME, + + "और ": messages.StepKeywordType_CONJUNCTION, + "तथा ": messages.StepKeywordType_CONJUNCTION, + + "पर ": messages.StepKeywordType_CONJUNCTION, + "परन्तु ": messages.StepKeywordType_CONJUNCTION, + "किन्तु ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "hr": &Dialect{ + "hr", "Croatian", "hrvatski", map[string][]string{ + feature: { + "Osobina", + "Mogućnost", + "Mogucnost", + }, + rule: { + "Rule", + }, + background: { + "Pozadina", + }, + scenario: { + "Primjer", + "Scenarij", + }, + scenarioOutline: { + "Skica", + "Koncept", + }, + examples: { + "Primjeri", + "Scenariji", + }, + given: { + "* ", + "Zadan ", + "Zadani ", + "Zadano ", + "Ukoliko ", + }, + when: { + "* ", + "Kada ", + "Kad ", + }, + then: { + "* ", + "Onda ", + }, + and: { + "* ", + "I ", + }, + but: { + "* ", + "Ali ", + }, + }, + map[string]messages.StepKeywordType{ + "Zadan ": messages.StepKeywordType_CONTEXT, + "Zadani ": messages.StepKeywordType_CONTEXT, + "Zadano ": messages.StepKeywordType_CONTEXT, + "Ukoliko ": messages.StepKeywordType_CONTEXT, + + "Kada ": messages.StepKeywordType_ACTION, + "Kad ": messages.StepKeywordType_ACTION, + + "Onda ": messages.StepKeywordType_OUTCOME, + + "I ": messages.StepKeywordType_CONJUNCTION, + + "Ali ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ht": &Dialect{ + "ht", "Creole", "kreyòl", map[string][]string{ + feature: { + "Karakteristik", + "Mak", + "Fonksyonalite", + }, + rule: { + "Rule", + }, + background: { + "Kontèks", + "Istorik", + }, + scenario: { + "Senaryo", + }, + scenarioOutline: { + "Plan senaryo", + "Plan Senaryo", + "Senaryo deskripsyon", + "Senaryo Deskripsyon", + "Dyagram senaryo", + "Dyagram Senaryo", + }, + examples: { + "Egzanp", + }, + given: { + "* ", + "Sipoze ", + "Sipoze ke ", + "Sipoze Ke ", + }, + when: { + "* ", + "Lè ", + "Le ", + }, + then: { + "* ", + "Lè sa a ", + "Le sa a ", + }, + and: { + "* ", + "Ak ", + "Epi ", + "E ", + }, + but: { + "* ", + "Men ", + }, + }, + map[string]messages.StepKeywordType{ + "Sipoze ": messages.StepKeywordType_CONTEXT, + "Sipoze ke ": messages.StepKeywordType_CONTEXT, + "Sipoze Ke ": messages.StepKeywordType_CONTEXT, + + "Lè ": messages.StepKeywordType_ACTION, + "Le ": messages.StepKeywordType_ACTION, + + "Lè sa a ": messages.StepKeywordType_OUTCOME, + "Le sa a ": messages.StepKeywordType_OUTCOME, + + "Ak ": messages.StepKeywordType_CONJUNCTION, + "Epi ": messages.StepKeywordType_CONJUNCTION, + "E ": messages.StepKeywordType_CONJUNCTION, + + "Men ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "hu": &Dialect{ + "hu", "Hungarian", "magyar", map[string][]string{ + feature: { + "Jellemző", + }, + rule: { + "Szabály", + }, + background: { + "Háttér", + }, + scenario: { + "Példa", + "Forgatókönyv", + }, + scenarioOutline: { + "Forgatókönyv vázlat", + }, + examples: { + "Példák", + }, + given: { + "* ", + "Amennyiben ", + "Adott ", + }, + when: { + "* ", + "Majd ", + "Ha ", + "Amikor ", + }, + then: { + "* ", + "Akkor ", + }, + and: { + "* ", + "És ", + }, + but: { + "* ", + "De ", + }, + }, + map[string]messages.StepKeywordType{ + "Amennyiben ": messages.StepKeywordType_CONTEXT, + "Adott ": messages.StepKeywordType_CONTEXT, + + "Majd ": messages.StepKeywordType_ACTION, + "Ha ": messages.StepKeywordType_ACTION, + "Amikor ": messages.StepKeywordType_ACTION, + + "Akkor ": messages.StepKeywordType_OUTCOME, + + "És ": messages.StepKeywordType_CONJUNCTION, + + "De ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "id": &Dialect{ + "id", "Indonesian", "Bahasa Indonesia", map[string][]string{ + feature: { + "Fitur", + }, + rule: { + "Rule", + "Aturan", + }, + background: { + "Dasar", + "Latar Belakang", + }, + scenario: { + "Skenario", + }, + scenarioOutline: { + "Skenario konsep", + "Garis-Besar Skenario", + }, + examples: { + "Contoh", + "Misal", + }, + given: { + "* ", + "Dengan ", + "Diketahui ", + "Diasumsikan ", + "Bila ", + "Jika ", + }, + when: { + "* ", + "Ketika ", + }, + then: { + "* ", + "Maka ", + "Kemudian ", + }, + and: { + "* ", + "Dan ", + }, + but: { + "* ", + "Tapi ", + "Tetapi ", + }, + }, + map[string]messages.StepKeywordType{ + "Dengan ": messages.StepKeywordType_CONTEXT, + "Diketahui ": messages.StepKeywordType_CONTEXT, + "Diasumsikan ": messages.StepKeywordType_CONTEXT, + "Bila ": messages.StepKeywordType_CONTEXT, + "Jika ": messages.StepKeywordType_CONTEXT, + + "Ketika ": messages.StepKeywordType_ACTION, + + "Maka ": messages.StepKeywordType_OUTCOME, + "Kemudian ": messages.StepKeywordType_OUTCOME, + + "Dan ": messages.StepKeywordType_CONJUNCTION, + + "Tapi ": messages.StepKeywordType_CONJUNCTION, + "Tetapi ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "is": &Dialect{ + "is", "Icelandic", "Íslenska", map[string][]string{ + feature: { + "Eiginleiki", + }, + rule: { + "Rule", + }, + background: { + "Bakgrunnur", + }, + scenario: { + "Atburðarás", + }, + scenarioOutline: { + "Lýsing Atburðarásar", + "Lýsing Dæma", + }, + examples: { + "Dæmi", + "Atburðarásir", + }, + given: { + "* ", + "Ef ", + }, + when: { + "* ", + "Þegar ", + }, + then: { + "* ", + "Þá ", + }, + and: { + "* ", + "Og ", + }, + but: { + "* ", + "En ", + }, + }, + map[string]messages.StepKeywordType{ + "Ef ": messages.StepKeywordType_CONTEXT, + + "Þegar ": messages.StepKeywordType_ACTION, + + "Þá ": messages.StepKeywordType_OUTCOME, + + "Og ": messages.StepKeywordType_CONJUNCTION, + + "En ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "it": &Dialect{ + "it", "Italian", "italiano", map[string][]string{ + feature: { + "Funzionalità", + "Esigenza di Business", + "Abilità", + }, + rule: { + "Regola", + }, + background: { + "Contesto", + }, + scenario: { + "Esempio", + "Scenario", + }, + scenarioOutline: { + "Schema dello scenario", + }, + examples: { + "Esempi", + }, + given: { + "* ", + "Dato ", + "Data ", + "Dati ", + "Date ", + }, + when: { + "* ", + "Quando ", + }, + then: { + "* ", + "Allora ", + }, + and: { + "* ", + "E ", + }, + but: { + "* ", + "Ma ", + }, + }, + map[string]messages.StepKeywordType{ + "Dato ": messages.StepKeywordType_CONTEXT, + "Data ": messages.StepKeywordType_CONTEXT, + "Dati ": messages.StepKeywordType_CONTEXT, + "Date ": messages.StepKeywordType_CONTEXT, + + "Quando ": messages.StepKeywordType_ACTION, + + "Allora ": messages.StepKeywordType_OUTCOME, + + "E ": messages.StepKeywordType_CONJUNCTION, + + "Ma ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ja": &Dialect{ + "ja", "Japanese", "日本語", map[string][]string{ + feature: { + "フィーチャ", + "機能", + }, + rule: { + "Rule", + }, + background: { + "背景", + }, + scenario: { + "シナリオ", + }, + scenarioOutline: { + "シナリオアウトライン", + "シナリオテンプレート", + "テンプレ", + "シナリオテンプレ", + }, + examples: { + "例", + "サンプル", + }, + given: { + "* ", + "前提", + }, + when: { + "* ", + "もし", + }, + then: { + "* ", + "ならば", + }, + and: { + "* ", + "かつ", + }, + but: { + "* ", + "しかし", + "但し", + "ただし", + }, + }, + map[string]messages.StepKeywordType{ + "前提": messages.StepKeywordType_CONTEXT, + + "もし": messages.StepKeywordType_ACTION, + + "ならば": messages.StepKeywordType_OUTCOME, + + "かつ": messages.StepKeywordType_CONJUNCTION, + + "しかし": messages.StepKeywordType_CONJUNCTION, + "但し": messages.StepKeywordType_CONJUNCTION, + "ただし": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "jv": &Dialect{ + "jv", "Javanese", "Basa Jawa", map[string][]string{ + feature: { + "Fitur", + }, + rule: { + "Rule", + }, + background: { + "Dasar", + }, + scenario: { + "Skenario", + }, + scenarioOutline: { + "Konsep skenario", + }, + examples: { + "Conto", + "Contone", + }, + given: { + "* ", + "Nalika ", + "Nalikaning ", + }, + when: { + "* ", + "Manawa ", + "Menawa ", + }, + then: { + "* ", + "Njuk ", + "Banjur ", + }, + and: { + "* ", + "Lan ", + }, + but: { + "* ", + "Tapi ", + "Nanging ", + "Ananging ", + }, + }, + map[string]messages.StepKeywordType{ + "Nalika ": messages.StepKeywordType_CONTEXT, + "Nalikaning ": messages.StepKeywordType_CONTEXT, + + "Manawa ": messages.StepKeywordType_ACTION, + "Menawa ": messages.StepKeywordType_ACTION, + + "Njuk ": messages.StepKeywordType_OUTCOME, + "Banjur ": messages.StepKeywordType_OUTCOME, + + "Lan ": messages.StepKeywordType_CONJUNCTION, + + "Tapi ": messages.StepKeywordType_CONJUNCTION, + "Nanging ": messages.StepKeywordType_CONJUNCTION, + "Ananging ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ka": &Dialect{ + "ka", "Georgian", "ქართველი", map[string][]string{ + feature: { + "თვისება", + }, + rule: { + "Rule", + }, + background: { + "კონტექსტი", + }, + scenario: { + "მაგალითად", + "სცენარის", + }, + scenarioOutline: { + "სცენარის ნიმუში", + }, + examples: { + "მაგალითები", + }, + given: { + "* ", + "მოცემული", + }, + when: { + "* ", + "როდესაც", + }, + then: { + "* ", + "მაშინ", + }, + and: { + "* ", + "და", + }, + but: { + "* ", + "მაგ­რამ", + }, + }, + map[string]messages.StepKeywordType{ + "მოცემული": messages.StepKeywordType_CONTEXT, + + "როდესაც": messages.StepKeywordType_ACTION, + + "მაშინ": messages.StepKeywordType_OUTCOME, + + "და": messages.StepKeywordType_CONJUNCTION, + + "მაგ­რამ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "kn": &Dialect{ + "kn", "Kannada", "ಕನ್ನಡ", map[string][]string{ + feature: { + "ಹೆಚ್ಚಳ", + }, + rule: { + "Rule", + }, + background: { + "ಹಿನ್ನೆಲೆ", + }, + scenario: { + "ಉದಾಹರಣೆ", + "ಕಥಾಸಾರಾಂಶ", + }, + scenarioOutline: { + "ವಿವರಣೆ", + }, + examples: { + "ಉದಾಹರಣೆಗಳು", + }, + given: { + "* ", + "ನೀಡಿದ ", + }, + when: { + "* ", + "ಸ್ಥಿತಿಯನ್ನು ", + }, + then: { + "* ", + "ನಂತರ ", + }, + and: { + "* ", + "ಮತ್ತು ", + }, + but: { + "* ", + "ಆದರೆ ", + }, + }, + map[string]messages.StepKeywordType{ + "ನೀಡಿದ ": messages.StepKeywordType_CONTEXT, + + "ಸ್ಥಿತಿಯನ್ನು ": messages.StepKeywordType_ACTION, + + "ನಂತರ ": messages.StepKeywordType_OUTCOME, + + "ಮತ್ತು ": messages.StepKeywordType_CONJUNCTION, + + "ಆದರೆ ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ko": &Dialect{ + "ko", "Korean", "한국어", map[string][]string{ + feature: { + "기능", + }, + rule: { + "Rule", + }, + background: { + "배경", + }, + scenario: { + "시나리오", + }, + scenarioOutline: { + "시나리오 개요", + }, + examples: { + "예", + }, + given: { + "* ", + "조건", + "먼저", + }, + when: { + "* ", + "만일", + "만약", + }, + then: { + "* ", + "그러면", + }, + and: { + "* ", + "그리고", + }, + but: { + "* ", + "하지만", + "단", + }, + }, + map[string]messages.StepKeywordType{ + "조건": messages.StepKeywordType_CONTEXT, + "먼저": messages.StepKeywordType_CONTEXT, + + "만일": messages.StepKeywordType_ACTION, + "만약": messages.StepKeywordType_ACTION, + + "그러면": messages.StepKeywordType_OUTCOME, + + "그리고": messages.StepKeywordType_CONJUNCTION, + + "하지만": messages.StepKeywordType_CONJUNCTION, + "단": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "lt": &Dialect{ + "lt", "Lithuanian", "lietuvių kalba", map[string][]string{ + feature: { + "Savybė", + }, + rule: { + "Rule", + }, + background: { + "Kontekstas", + }, + scenario: { + "Pavyzdys", + "Scenarijus", + }, + scenarioOutline: { + "Scenarijaus šablonas", + }, + examples: { + "Pavyzdžiai", + "Scenarijai", + "Variantai", + }, + given: { + "* ", + "Duota ", + }, + when: { + "* ", + "Kai ", + }, + then: { + "* ", + "Tada ", + }, + and: { + "* ", + "Ir ", + }, + but: { + "* ", + "Bet ", + }, + }, + map[string]messages.StepKeywordType{ + "Duota ": messages.StepKeywordType_CONTEXT, + + "Kai ": messages.StepKeywordType_ACTION, + + "Tada ": messages.StepKeywordType_OUTCOME, + + "Ir ": messages.StepKeywordType_CONJUNCTION, + + "Bet ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "lu": &Dialect{ + "lu", "Luxemburgish", "Lëtzebuergesch", map[string][]string{ + feature: { + "Funktionalitéit", + }, + rule: { + "Rule", + }, + background: { + "Hannergrond", + }, + scenario: { + "Beispill", + "Szenario", + }, + scenarioOutline: { + "Plang vum Szenario", + }, + examples: { + "Beispiller", + }, + given: { + "* ", + "ugeholl ", + }, + when: { + "* ", + "wann ", + }, + then: { + "* ", + "dann ", + }, + and: { + "* ", + "an ", + "a ", + }, + but: { + "* ", + "awer ", + "mä ", + }, + }, + map[string]messages.StepKeywordType{ + "ugeholl ": messages.StepKeywordType_CONTEXT, + + "wann ": messages.StepKeywordType_ACTION, + + "dann ": messages.StepKeywordType_OUTCOME, + + "an ": messages.StepKeywordType_CONJUNCTION, + "a ": messages.StepKeywordType_CONJUNCTION, + + "awer ": messages.StepKeywordType_CONJUNCTION, + "mä ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "lv": &Dialect{ + "lv", "Latvian", "latviešu", map[string][]string{ + feature: { + "Funkcionalitāte", + "Fīča", + }, + rule: { + "Rule", + }, + background: { + "Konteksts", + "Situācija", + }, + scenario: { + "Piemērs", + "Scenārijs", + }, + scenarioOutline: { + "Scenārijs pēc parauga", + }, + examples: { + "Piemēri", + "Paraugs", + }, + given: { + "* ", + "Kad ", + }, + when: { + "* ", + "Ja ", + }, + then: { + "* ", + "Tad ", + }, + and: { + "* ", + "Un ", + }, + but: { + "* ", + "Bet ", + }, + }, + map[string]messages.StepKeywordType{ + "Kad ": messages.StepKeywordType_CONTEXT, + + "Ja ": messages.StepKeywordType_ACTION, + + "Tad ": messages.StepKeywordType_OUTCOME, + + "Un ": messages.StepKeywordType_CONJUNCTION, + + "Bet ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "mk-Cyrl": &Dialect{ + "mk-Cyrl", "Macedonian", "Македонски", map[string][]string{ + feature: { + "Функционалност", + "Бизнис потреба", + "Можност", + }, + rule: { + "Rule", + }, + background: { + "Контекст", + "Содржина", + }, + scenario: { + "Пример", + "Сценарио", + "На пример", + }, + scenarioOutline: { + "Преглед на сценарија", + "Скица", + "Концепт", + }, + examples: { + "Примери", + "Сценарија", + }, + given: { + "* ", + "Дадено ", + "Дадена ", + }, + when: { + "* ", + "Кога ", + }, + then: { + "* ", + "Тогаш ", + }, + and: { + "* ", + "И ", + }, + but: { + "* ", + "Но ", + }, + }, + map[string]messages.StepKeywordType{ + "Дадено ": messages.StepKeywordType_CONTEXT, + "Дадена ": messages.StepKeywordType_CONTEXT, + + "Кога ": messages.StepKeywordType_ACTION, + + "Тогаш ": messages.StepKeywordType_OUTCOME, + + "И ": messages.StepKeywordType_CONJUNCTION, + + "Но ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "mk-Latn": &Dialect{ + "mk-Latn", "Macedonian (Latin)", "Makedonski (Latinica)", map[string][]string{ + feature: { + "Funkcionalnost", + "Biznis potreba", + "Mozhnost", + }, + rule: { + "Rule", + }, + background: { + "Kontekst", + "Sodrzhina", + }, + scenario: { + "Scenario", + "Na primer", + }, + scenarioOutline: { + "Pregled na scenarija", + "Skica", + "Koncept", + }, + examples: { + "Primeri", + "Scenaria", + }, + given: { + "* ", + "Dadeno ", + "Dadena ", + }, + when: { + "* ", + "Koga ", + }, + then: { + "* ", + "Togash ", + }, + and: { + "* ", + "I ", + }, + but: { + "* ", + "No ", + }, + }, + map[string]messages.StepKeywordType{ + "Dadeno ": messages.StepKeywordType_CONTEXT, + "Dadena ": messages.StepKeywordType_CONTEXT, + + "Koga ": messages.StepKeywordType_ACTION, + + "Togash ": messages.StepKeywordType_OUTCOME, + + "I ": messages.StepKeywordType_CONJUNCTION, + + "No ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "mn": &Dialect{ + "mn", "Mongolian", "монгол", map[string][]string{ + feature: { + "Функц", + "Функционал", + }, + rule: { + "Rule", + }, + background: { + "Агуулга", + }, + scenario: { + "Сценар", + }, + scenarioOutline: { + "Сценарын төлөвлөгөө", + }, + examples: { + "Тухайлбал", + }, + given: { + "* ", + "Өгөгдсөн нь ", + "Анх ", + }, + when: { + "* ", + "Хэрэв ", + }, + then: { + "* ", + "Тэгэхэд ", + "Үүний дараа ", + }, + and: { + "* ", + "Мөн ", + "Тэгээд ", + }, + but: { + "* ", + "Гэхдээ ", + "Харин ", + }, + }, + map[string]messages.StepKeywordType{ + "Өгөгдсөн нь ": messages.StepKeywordType_CONTEXT, + "Анх ": messages.StepKeywordType_CONTEXT, + + "Хэрэв ": messages.StepKeywordType_ACTION, + + "Тэгэхэд ": messages.StepKeywordType_OUTCOME, + "Үүний дараа ": messages.StepKeywordType_OUTCOME, + + "Мөн ": messages.StepKeywordType_CONJUNCTION, + "Тэгээд ": messages.StepKeywordType_CONJUNCTION, + + "Гэхдээ ": messages.StepKeywordType_CONJUNCTION, + "Харин ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ne": &Dialect{ + "ne", "Nepali", "नेपाली", map[string][]string{ + feature: { + "सुविधा", + "विशेषता", + }, + rule: { + "नियम", + }, + background: { + "पृष्ठभूमी", + }, + scenario: { + "परिदृश्य", + }, + scenarioOutline: { + "परिदृश्य रूपरेखा", + }, + examples: { + "उदाहरण", + "उदाहरणहरु", + }, + given: { + "* ", + "दिइएको ", + "दिएको ", + "यदि ", + }, + when: { + "* ", + "जब ", + }, + then: { + "* ", + "त्यसपछि ", + "अनी ", + }, + and: { + "* ", + "र ", + "अनि ", + }, + but: { + "* ", + "तर ", + }, + }, + map[string]messages.StepKeywordType{ + "दिइएको ": messages.StepKeywordType_CONTEXT, + "दिएको ": messages.StepKeywordType_CONTEXT, + "यदि ": messages.StepKeywordType_CONTEXT, + + "जब ": messages.StepKeywordType_ACTION, + + "त्यसपछि ": messages.StepKeywordType_OUTCOME, + "अनी ": messages.StepKeywordType_OUTCOME, + + "र ": messages.StepKeywordType_CONJUNCTION, + "अनि ": messages.StepKeywordType_CONJUNCTION, + + "तर ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "nl": &Dialect{ + "nl", "Dutch", "Nederlands", map[string][]string{ + feature: { + "Functionaliteit", + }, + rule: { + "Rule", + }, + background: { + "Achtergrond", + }, + scenario: { + "Voorbeeld", + "Scenario", + }, + scenarioOutline: { + "Abstract Scenario", + }, + examples: { + "Voorbeelden", + }, + given: { + "* ", + "Gegeven ", + "Stel ", + }, + when: { + "* ", + "Als ", + "Wanneer ", + }, + then: { + "* ", + "Dan ", + }, + and: { + "* ", + "En ", + }, + but: { + "* ", + "Maar ", + }, + }, + map[string]messages.StepKeywordType{ + "Gegeven ": messages.StepKeywordType_CONTEXT, + "Stel ": messages.StepKeywordType_CONTEXT, + + "Als ": messages.StepKeywordType_ACTION, + "Wanneer ": messages.StepKeywordType_ACTION, + + "Dan ": messages.StepKeywordType_OUTCOME, + + "En ": messages.StepKeywordType_CONJUNCTION, + + "Maar ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "no": &Dialect{ + "no", "Norwegian", "norsk", map[string][]string{ + feature: { + "Egenskap", + }, + rule: { + "Regel", + }, + background: { + "Bakgrunn", + }, + scenario: { + "Eksempel", + "Scenario", + }, + scenarioOutline: { + "Scenariomal", + "Abstrakt Scenario", + }, + examples: { + "Eksempler", + }, + given: { + "* ", + "Gitt ", + }, + when: { + "* ", + "Når ", + }, + then: { + "* ", + "Så ", + }, + and: { + "* ", + "Og ", + }, + but: { + "* ", + "Men ", + }, + }, + map[string]messages.StepKeywordType{ + "Gitt ": messages.StepKeywordType_CONTEXT, + + "Når ": messages.StepKeywordType_ACTION, + + "Så ": messages.StepKeywordType_OUTCOME, + + "Og ": messages.StepKeywordType_CONJUNCTION, + + "Men ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "pa": &Dialect{ + "pa", "Panjabi", "ਪੰਜਾਬੀ", map[string][]string{ + feature: { + "ਖਾਸੀਅਤ", + "ਮੁਹਾਂਦਰਾ", + "ਨਕਸ਼ ਨੁਹਾਰ", + }, + rule: { + "Rule", + }, + background: { + "ਪਿਛੋਕੜ", + }, + scenario: { + "ਉਦਾਹਰਨ", + "ਪਟਕਥਾ", + }, + scenarioOutline: { + "ਪਟਕਥਾ ਢਾਂਚਾ", + "ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ", + }, + examples: { + "ਉਦਾਹਰਨਾਂ", + }, + given: { + "* ", + "ਜੇਕਰ ", + "ਜਿਵੇਂ ਕਿ ", + }, + when: { + "* ", + "ਜਦੋਂ ", + }, + then: { + "* ", + "ਤਦ ", + }, + and: { + "* ", + "ਅਤੇ ", + }, + but: { + "* ", + "ਪਰ ", + }, + }, + map[string]messages.StepKeywordType{ + "ਜੇਕਰ ": messages.StepKeywordType_CONTEXT, + "ਜਿਵੇਂ ਕਿ ": messages.StepKeywordType_CONTEXT, + + "ਜਦੋਂ ": messages.StepKeywordType_ACTION, + + "ਤਦ ": messages.StepKeywordType_OUTCOME, + + "ਅਤੇ ": messages.StepKeywordType_CONJUNCTION, + + "ਪਰ ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "pl": &Dialect{ + "pl", "Polish", "polski", map[string][]string{ + feature: { + "Właściwość", + "Funkcja", + "Aspekt", + "Potrzeba biznesowa", + }, + rule: { + "Zasada", + "Reguła", + }, + background: { + "Założenia", + }, + scenario: { + "Przykład", + "Scenariusz", + }, + scenarioOutline: { + "Szablon scenariusza", + }, + examples: { + "Przykłady", + }, + given: { + "* ", + "Zakładając ", + "Mając ", + "Zakładając, że ", + }, + when: { + "* ", + "Jeżeli ", + "Jeśli ", + "Gdy ", + "Kiedy ", + }, + then: { + "* ", + "Wtedy ", + }, + and: { + "* ", + "Oraz ", + "I ", + }, + but: { + "* ", + "Ale ", + }, + }, + map[string]messages.StepKeywordType{ + "Zakładając ": messages.StepKeywordType_CONTEXT, + "Mając ": messages.StepKeywordType_CONTEXT, + "Zakładając, że ": messages.StepKeywordType_CONTEXT, + + "Jeżeli ": messages.StepKeywordType_ACTION, + "Jeśli ": messages.StepKeywordType_ACTION, + "Gdy ": messages.StepKeywordType_ACTION, + "Kiedy ": messages.StepKeywordType_ACTION, + + "Wtedy ": messages.StepKeywordType_OUTCOME, + + "Oraz ": messages.StepKeywordType_CONJUNCTION, + "I ": messages.StepKeywordType_CONJUNCTION, + + "Ale ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "pt": &Dialect{ + "pt", "Portuguese", "português", map[string][]string{ + feature: { + "Funcionalidade", + "Característica", + "Caracteristica", + }, + rule: { + "Regra", + }, + background: { + "Contexto", + "Cenário de Fundo", + "Cenario de Fundo", + "Fundo", + }, + scenario: { + "Exemplo", + "Cenário", + "Cenario", + }, + scenarioOutline: { + "Esquema do Cenário", + "Esquema do Cenario", + "Delineação do Cenário", + "Delineacao do Cenario", + }, + examples: { + "Exemplos", + "Cenários", + "Cenarios", + }, + given: { + "* ", + "Dado ", + "Dada ", + "Dados ", + "Dadas ", + }, + when: { + "* ", + "Quando ", + }, + then: { + "* ", + "Então ", + "Entao ", + }, + and: { + "* ", + "E ", + }, + but: { + "* ", + "Mas ", + }, + }, + map[string]messages.StepKeywordType{ + "Dado ": messages.StepKeywordType_CONTEXT, + "Dada ": messages.StepKeywordType_CONTEXT, + "Dados ": messages.StepKeywordType_CONTEXT, + "Dadas ": messages.StepKeywordType_CONTEXT, + + "Quando ": messages.StepKeywordType_ACTION, + + "Então ": messages.StepKeywordType_OUTCOME, + "Entao ": messages.StepKeywordType_OUTCOME, + + "E ": messages.StepKeywordType_CONJUNCTION, + + "Mas ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ro": &Dialect{ + "ro", "Romanian", "română", map[string][]string{ + feature: { + "Functionalitate", + "Funcționalitate", + "Funcţionalitate", + }, + rule: { + "Rule", + }, + background: { + "Context", + }, + scenario: { + "Exemplu", + "Scenariu", + }, + scenarioOutline: { + "Structura scenariu", + "Structură scenariu", + }, + examples: { + "Exemple", + }, + given: { + "* ", + "Date fiind ", + "Dat fiind ", + "Dată fiind", + "Dati fiind ", + "Dați fiind ", + "Daţi fiind ", + }, + when: { + "* ", + "Cand ", + "Când ", + }, + then: { + "* ", + "Atunci ", + }, + and: { + "* ", + "Si ", + "Și ", + "Şi ", + }, + but: { + "* ", + "Dar ", + }, + }, + map[string]messages.StepKeywordType{ + "Date fiind ": messages.StepKeywordType_CONTEXT, + "Dat fiind ": messages.StepKeywordType_CONTEXT, + "Dată fiind": messages.StepKeywordType_CONTEXT, + "Dati fiind ": messages.StepKeywordType_CONTEXT, + "Dați fiind ": messages.StepKeywordType_CONTEXT, + "Daţi fiind ": messages.StepKeywordType_CONTEXT, + + "Cand ": messages.StepKeywordType_ACTION, + "Când ": messages.StepKeywordType_ACTION, + + "Atunci ": messages.StepKeywordType_OUTCOME, + + "Si ": messages.StepKeywordType_CONJUNCTION, + "Și ": messages.StepKeywordType_CONJUNCTION, + "Şi ": messages.StepKeywordType_CONJUNCTION, + + "Dar ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ru": &Dialect{ + "ru", "Russian", "русский", map[string][]string{ + feature: { + "Функция", + "Функциональность", + "Функционал", + "Свойство", + }, + rule: { + "Правило", + }, + background: { + "Предыстория", + "Контекст", + }, + scenario: { + "Пример", + "Сценарий", + }, + scenarioOutline: { + "Структура сценария", + "Шаблон сценария", + }, + examples: { + "Примеры", + }, + given: { + "* ", + "Допустим ", + "Дано ", + "Пусть ", + }, + when: { + "* ", + "Когда ", + "Если ", + }, + then: { + "* ", + "То ", + "Затем ", + "Тогда ", + }, + and: { + "* ", + "И ", + "К тому же ", + "Также ", + }, + but: { + "* ", + "Но ", + "А ", + "Иначе ", + }, + }, + map[string]messages.StepKeywordType{ + "Допустим ": messages.StepKeywordType_CONTEXT, + "Дано ": messages.StepKeywordType_CONTEXT, + "Пусть ": messages.StepKeywordType_CONTEXT, + + "Когда ": messages.StepKeywordType_ACTION, + "Если ": messages.StepKeywordType_ACTION, + + "То ": messages.StepKeywordType_OUTCOME, + "Затем ": messages.StepKeywordType_OUTCOME, + "Тогда ": messages.StepKeywordType_OUTCOME, + + "И ": messages.StepKeywordType_CONJUNCTION, + "К тому же ": messages.StepKeywordType_CONJUNCTION, + "Также ": messages.StepKeywordType_CONJUNCTION, + + "Но ": messages.StepKeywordType_CONJUNCTION, + "А ": messages.StepKeywordType_CONJUNCTION, + "Иначе ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "sk": &Dialect{ + "sk", "Slovak", "Slovensky", map[string][]string{ + feature: { + "Požiadavka", + "Funkcia", + "Vlastnosť", + }, + rule: { + "Rule", + }, + background: { + "Pozadie", + }, + scenario: { + "Príklad", + "Scenár", + }, + scenarioOutline: { + "Náčrt Scenáru", + "Náčrt Scenára", + "Osnova Scenára", + }, + examples: { + "Príklady", + }, + given: { + "* ", + "Pokiaľ ", + "Za predpokladu ", + }, + when: { + "* ", + "Keď ", + "Ak ", + }, + then: { + "* ", + "Tak ", + "Potom ", + }, + and: { + "* ", + "A ", + "A tiež ", + "A taktiež ", + "A zároveň ", + }, + but: { + "* ", + "Ale ", + }, + }, + map[string]messages.StepKeywordType{ + "Pokiaľ ": messages.StepKeywordType_CONTEXT, + "Za predpokladu ": messages.StepKeywordType_CONTEXT, + + "Keď ": messages.StepKeywordType_ACTION, + "Ak ": messages.StepKeywordType_ACTION, + + "Tak ": messages.StepKeywordType_OUTCOME, + "Potom ": messages.StepKeywordType_OUTCOME, + + "A ": messages.StepKeywordType_CONJUNCTION, + "A tiež ": messages.StepKeywordType_CONJUNCTION, + "A taktiež ": messages.StepKeywordType_CONJUNCTION, + "A zároveň ": messages.StepKeywordType_CONJUNCTION, + + "Ale ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "sl": &Dialect{ + "sl", "Slovenian", "Slovenski", map[string][]string{ + feature: { + "Funkcionalnost", + "Funkcija", + "Možnosti", + "Moznosti", + "Lastnost", + "Značilnost", + }, + rule: { + "Rule", + }, + background: { + "Kontekst", + "Osnova", + "Ozadje", + }, + scenario: { + "Primer", + "Scenarij", + }, + scenarioOutline: { + "Struktura scenarija", + "Skica", + "Koncept", + "Oris scenarija", + "Osnutek", + }, + examples: { + "Primeri", + "Scenariji", + }, + given: { + "Dano ", + "Podano ", + "Zaradi ", + "Privzeto ", + }, + when: { + "Ko ", + "Ce ", + "Če ", + "Kadar ", + }, + then: { + "Nato ", + "Potem ", + "Takrat ", + }, + and: { + "In ", + "Ter ", + }, + but: { + "Toda ", + "Ampak ", + "Vendar ", + }, + }, + map[string]messages.StepKeywordType{ + "Dano ": messages.StepKeywordType_CONTEXT, + "Podano ": messages.StepKeywordType_CONTEXT, + "Zaradi ": messages.StepKeywordType_CONTEXT, + "Privzeto ": messages.StepKeywordType_CONTEXT, + + "Ko ": messages.StepKeywordType_ACTION, + "Ce ": messages.StepKeywordType_ACTION, + "Če ": messages.StepKeywordType_ACTION, + "Kadar ": messages.StepKeywordType_ACTION, + + "Nato ": messages.StepKeywordType_OUTCOME, + "Potem ": messages.StepKeywordType_OUTCOME, + "Takrat ": messages.StepKeywordType_OUTCOME, + + "In ": messages.StepKeywordType_CONJUNCTION, + "Ter ": messages.StepKeywordType_CONJUNCTION, + + "Toda ": messages.StepKeywordType_CONJUNCTION, + "Ampak ": messages.StepKeywordType_CONJUNCTION, + "Vendar ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "sr-Cyrl": &Dialect{ + "sr-Cyrl", "Serbian", "Српски", map[string][]string{ + feature: { + "Функционалност", + "Могућност", + "Особина", + }, + rule: { + "Правило", + }, + background: { + "Контекст", + "Основа", + "Позадина", + }, + scenario: { + "Пример", + "Сценарио", + "Пример", + }, + scenarioOutline: { + "Структура сценарија", + "Скица", + "Концепт", + }, + examples: { + "Примери", + "Сценарији", + }, + given: { + "* ", + "За дато ", + "За дате ", + "За дати ", + }, + when: { + "* ", + "Када ", + "Кад ", + }, + then: { + "* ", + "Онда ", + }, + and: { + "* ", + "И ", + }, + but: { + "* ", + "Али ", + }, + }, + map[string]messages.StepKeywordType{ + "За дато ": messages.StepKeywordType_CONTEXT, + "За дате ": messages.StepKeywordType_CONTEXT, + "За дати ": messages.StepKeywordType_CONTEXT, + + "Када ": messages.StepKeywordType_ACTION, + "Кад ": messages.StepKeywordType_ACTION, + + "Онда ": messages.StepKeywordType_OUTCOME, + + "И ": messages.StepKeywordType_CONJUNCTION, + + "Али ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "sr-Latn": &Dialect{ + "sr-Latn", "Serbian (Latin)", "Srpski (Latinica)", map[string][]string{ + feature: { + "Funkcionalnost", + "Mogućnost", + "Mogucnost", + "Osobina", + }, + rule: { + "Pravilo", + }, + background: { + "Kontekst", + "Osnova", + "Pozadina", + }, + scenario: { + "Scenario", + "Primer", + }, + scenarioOutline: { + "Struktura scenarija", + "Skica", + "Koncept", + }, + examples: { + "Primeri", + "Scenariji", + }, + given: { + "* ", + "Za dato ", + "Za date ", + "Za dati ", + }, + when: { + "* ", + "Kada ", + "Kad ", + }, + then: { + "* ", + "Onda ", + }, + and: { + "* ", + "I ", + }, + but: { + "* ", + "Ali ", + }, + }, + map[string]messages.StepKeywordType{ + "Za dato ": messages.StepKeywordType_CONTEXT, + "Za date ": messages.StepKeywordType_CONTEXT, + "Za dati ": messages.StepKeywordType_CONTEXT, + + "Kada ": messages.StepKeywordType_ACTION, + "Kad ": messages.StepKeywordType_ACTION, + + "Onda ": messages.StepKeywordType_OUTCOME, + + "I ": messages.StepKeywordType_CONJUNCTION, + + "Ali ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "sv": &Dialect{ + "sv", "Swedish", "Svenska", map[string][]string{ + feature: { + "Egenskap", + }, + rule: { + "Regel", + }, + background: { + "Bakgrund", + }, + scenario: { + "Scenario", + }, + scenarioOutline: { + "Abstrakt Scenario", + "Scenariomall", + }, + examples: { + "Exempel", + }, + given: { + "* ", + "Givet ", + }, + when: { + "* ", + "När ", + }, + then: { + "* ", + "Så ", + }, + and: { + "* ", + "Och ", + }, + but: { + "* ", + "Men ", + }, + }, + map[string]messages.StepKeywordType{ + "Givet ": messages.StepKeywordType_CONTEXT, + + "När ": messages.StepKeywordType_ACTION, + + "Så ": messages.StepKeywordType_OUTCOME, + + "Och ": messages.StepKeywordType_CONJUNCTION, + + "Men ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ta": &Dialect{ + "ta", "Tamil", "தமிழ்", map[string][]string{ + feature: { + "அம்சம்", + "வணிக தேவை", + "திறன்", + }, + rule: { + "Rule", + }, + background: { + "பின்னணி", + }, + scenario: { + "உதாரணமாக", + "காட்சி", + }, + scenarioOutline: { + "காட்சி சுருக்கம்", + "காட்சி வார்ப்புரு", + }, + examples: { + "எடுத்துக்காட்டுகள்", + "காட்சிகள்", + "நிலைமைகளில்", + }, + given: { + "* ", + "கொடுக்கப்பட்ட ", + }, + when: { + "* ", + "எப்போது ", + }, + then: { + "* ", + "அப்பொழுது ", + }, + and: { + "* ", + "மேலும் ", + "மற்றும் ", + }, + but: { + "* ", + "ஆனால் ", + }, + }, + map[string]messages.StepKeywordType{ + "கொடுக்கப்பட்ட ": messages.StepKeywordType_CONTEXT, + + "எப்போது ": messages.StepKeywordType_ACTION, + + "அப்பொழுது ": messages.StepKeywordType_OUTCOME, + + "மேலும் ": messages.StepKeywordType_CONJUNCTION, + "மற்றும் ": messages.StepKeywordType_CONJUNCTION, + + "ஆனால் ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "th": &Dialect{ + "th", "Thai", "ไทย", map[string][]string{ + feature: { + "โครงหลัก", + "ความต้องการทางธุรกิจ", + "ความสามารถ", + }, + rule: { + "Rule", + }, + background: { + "แนวคิด", + }, + scenario: { + "เหตุการณ์", + }, + scenarioOutline: { + "สรุปเหตุการณ์", + "โครงสร้างของเหตุการณ์", + }, + examples: { + "ชุดของตัวอย่าง", + "ชุดของเหตุการณ์", + }, + given: { + "* ", + "กำหนดให้ ", + }, + when: { + "* ", + "เมื่อ ", + }, + then: { + "* ", + "ดังนั้น ", + }, + and: { + "* ", + "และ ", + }, + but: { + "* ", + "แต่ ", + }, + }, + map[string]messages.StepKeywordType{ + "กำหนดให้ ": messages.StepKeywordType_CONTEXT, + + "เมื่อ ": messages.StepKeywordType_ACTION, + + "ดังนั้น ": messages.StepKeywordType_OUTCOME, + + "และ ": messages.StepKeywordType_CONJUNCTION, + + "แต่ ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "te": &Dialect{ + "te", "Telugu", "తెలుగు", map[string][]string{ + feature: { + "గుణము", + }, + rule: { + "Rule", + }, + background: { + "నేపథ్యం", + }, + scenario: { + "ఉదాహరణ", + "సన్నివేశం", + }, + scenarioOutline: { + "కథనం", + }, + examples: { + "ఉదాహరణలు", + }, + given: { + "* ", + "చెప్పబడినది ", + }, + when: { + "* ", + "ఈ పరిస్థితిలో ", + }, + then: { + "* ", + "అప్పుడు ", + }, + and: { + "* ", + "మరియు ", + }, + but: { + "* ", + "కాని ", + }, + }, + map[string]messages.StepKeywordType{ + "చెప్పబడినది ": messages.StepKeywordType_CONTEXT, + + "ఈ పరిస్థితిలో ": messages.StepKeywordType_ACTION, + + "అప్పుడు ": messages.StepKeywordType_OUTCOME, + + "మరియు ": messages.StepKeywordType_CONJUNCTION, + + "కాని ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "tlh": &Dialect{ + "tlh", "Klingon", "tlhIngan", map[string][]string{ + feature: { + "Qap", + "Qu'meH 'ut", + "perbogh", + "poQbogh malja'", + "laH", + }, + rule: { + "Rule", + }, + background: { + "mo'", + }, + scenario: { + "lut", + }, + scenarioOutline: { + "lut chovnatlh", + }, + examples: { + "ghantoH", + "lutmey", + }, + given: { + "* ", + "ghu' noblu' ", + "DaH ghu' bejlu' ", + }, + when: { + "* ", + "qaSDI' ", + }, + then: { + "* ", + "vaj ", + }, + and: { + "* ", + "'ej ", + "latlh ", + }, + but: { + "* ", + "'ach ", + "'a ", + }, + }, + map[string]messages.StepKeywordType{ + "ghu' noblu' ": messages.StepKeywordType_CONTEXT, + "DaH ghu' bejlu' ": messages.StepKeywordType_CONTEXT, + + "qaSDI' ": messages.StepKeywordType_ACTION, + + "vaj ": messages.StepKeywordType_OUTCOME, + + "'ej ": messages.StepKeywordType_CONJUNCTION, + "latlh ": messages.StepKeywordType_CONJUNCTION, + + "'ach ": messages.StepKeywordType_CONJUNCTION, + "'a ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "tr": &Dialect{ + "tr", "Turkish", "Türkçe", map[string][]string{ + feature: { + "Özellik", + }, + rule: { + "Kural", + }, + background: { + "Geçmiş", + }, + scenario: { + "Örnek", + "Senaryo", + }, + scenarioOutline: { + "Senaryo taslağı", + }, + examples: { + "Örnekler", + }, + given: { + "* ", + "Diyelim ki ", + }, + when: { + "* ", + "Eğer ki ", + }, + then: { + "* ", + "O zaman ", + }, + and: { + "* ", + "Ve ", + }, + but: { + "* ", + "Fakat ", + "Ama ", + }, + }, + map[string]messages.StepKeywordType{ + "Diyelim ki ": messages.StepKeywordType_CONTEXT, + + "Eğer ki ": messages.StepKeywordType_ACTION, + + "O zaman ": messages.StepKeywordType_OUTCOME, + + "Ve ": messages.StepKeywordType_CONJUNCTION, + + "Fakat ": messages.StepKeywordType_CONJUNCTION, + "Ama ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "tt": &Dialect{ + "tt", "Tatar", "Татарча", map[string][]string{ + feature: { + "Мөмкинлек", + "Үзенчәлеклелек", + }, + rule: { + "Rule", + }, + background: { + "Кереш", + }, + scenario: { + "Сценарий", + }, + scenarioOutline: { + "Сценарийның төзелеше", + }, + examples: { + "Үрнәкләр", + "Мисаллар", + }, + given: { + "* ", + "Әйтик ", + }, + when: { + "* ", + "Әгәр ", + }, + then: { + "* ", + "Нәтиҗәдә ", + }, + and: { + "* ", + "Һәм ", + "Вә ", + }, + but: { + "* ", + "Ләкин ", + "Әмма ", + }, + }, + map[string]messages.StepKeywordType{ + "Әйтик ": messages.StepKeywordType_CONTEXT, + + "Әгәр ": messages.StepKeywordType_ACTION, + + "Нәтиҗәдә ": messages.StepKeywordType_OUTCOME, + + "Һәм ": messages.StepKeywordType_CONJUNCTION, + "Вә ": messages.StepKeywordType_CONJUNCTION, + + "Ләкин ": messages.StepKeywordType_CONJUNCTION, + "Әмма ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "uk": &Dialect{ + "uk", "Ukrainian", "Українська", map[string][]string{ + feature: { + "Функціонал", + }, + rule: { + "Rule", + }, + background: { + "Передумова", + }, + scenario: { + "Приклад", + "Сценарій", + }, + scenarioOutline: { + "Структура сценарію", + }, + examples: { + "Приклади", + }, + given: { + "* ", + "Припустимо ", + "Припустимо, що ", + "Нехай ", + "Дано ", + }, + when: { + "* ", + "Якщо ", + "Коли ", + }, + then: { + "* ", + "То ", + "Тоді ", + }, + and: { + "* ", + "І ", + "А також ", + "Та ", + }, + but: { + "* ", + "Але ", + }, + }, + map[string]messages.StepKeywordType{ + "Припустимо ": messages.StepKeywordType_CONTEXT, + "Припустимо, що ": messages.StepKeywordType_CONTEXT, + "Нехай ": messages.StepKeywordType_CONTEXT, + "Дано ": messages.StepKeywordType_CONTEXT, + + "Якщо ": messages.StepKeywordType_ACTION, + "Коли ": messages.StepKeywordType_ACTION, + + "То ": messages.StepKeywordType_OUTCOME, + "Тоді ": messages.StepKeywordType_OUTCOME, + + "І ": messages.StepKeywordType_CONJUNCTION, + "А також ": messages.StepKeywordType_CONJUNCTION, + "Та ": messages.StepKeywordType_CONJUNCTION, + + "Але ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "ur": &Dialect{ + "ur", "Urdu", "اردو", map[string][]string{ + feature: { + "صلاحیت", + "کاروبار کی ضرورت", + "خصوصیت", + }, + rule: { + "Rule", + }, + background: { + "پس منظر", + }, + scenario: { + "منظرنامہ", + }, + scenarioOutline: { + "منظر نامے کا خاکہ", + }, + examples: { + "مثالیں", + }, + given: { + "* ", + "اگر ", + "بالفرض ", + "فرض کیا ", + }, + when: { + "* ", + "جب ", + }, + then: { + "* ", + "پھر ", + "تب ", + }, + and: { + "* ", + "اور ", + }, + but: { + "* ", + "لیکن ", + }, + }, + map[string]messages.StepKeywordType{ + "اگر ": messages.StepKeywordType_CONTEXT, + "بالفرض ": messages.StepKeywordType_CONTEXT, + "فرض کیا ": messages.StepKeywordType_CONTEXT, + + "جب ": messages.StepKeywordType_ACTION, + + "پھر ": messages.StepKeywordType_OUTCOME, + "تب ": messages.StepKeywordType_OUTCOME, + + "اور ": messages.StepKeywordType_CONJUNCTION, + + "لیکن ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "uz": &Dialect{ + "uz", "Uzbek", "Узбекча", map[string][]string{ + feature: { + "Функционал", + }, + rule: { + "Rule", + }, + background: { + "Тарих", + }, + scenario: { + "Сценарий", + }, + scenarioOutline: { + "Сценарий структураси", + }, + examples: { + "Мисоллар", + }, + given: { + "* ", + "Belgilangan ", + }, + when: { + "* ", + "Агар ", + }, + then: { + "* ", + "Унда ", + }, + and: { + "* ", + "Ва ", + }, + but: { + "* ", + "Лекин ", + "Бирок ", + "Аммо ", + }, + }, + map[string]messages.StepKeywordType{ + "Belgilangan ": messages.StepKeywordType_CONTEXT, + + "Агар ": messages.StepKeywordType_ACTION, + + "Унда ": messages.StepKeywordType_OUTCOME, + + "Ва ": messages.StepKeywordType_CONJUNCTION, + + "Лекин ": messages.StepKeywordType_CONJUNCTION, + "Бирок ": messages.StepKeywordType_CONJUNCTION, + "Аммо ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "vi": &Dialect{ + "vi", "Vietnamese", "Tiếng Việt", map[string][]string{ + feature: { + "Tính năng", + }, + rule: { + "Rule", + }, + background: { + "Bối cảnh", + }, + scenario: { + "Tình huống", + "Kịch bản", + }, + scenarioOutline: { + "Khung tình huống", + "Khung kịch bản", + }, + examples: { + "Dữ liệu", + }, + given: { + "* ", + "Biết ", + "Cho ", + }, + when: { + "* ", + "Khi ", + }, + then: { + "* ", + "Thì ", + }, + and: { + "* ", + "Và ", + }, + but: { + "* ", + "Nhưng ", + }, + }, + map[string]messages.StepKeywordType{ + "Biết ": messages.StepKeywordType_CONTEXT, + "Cho ": messages.StepKeywordType_CONTEXT, + + "Khi ": messages.StepKeywordType_ACTION, + + "Thì ": messages.StepKeywordType_OUTCOME, + + "Và ": messages.StepKeywordType_CONJUNCTION, + + "Nhưng ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "zh-CN": &Dialect{ + "zh-CN", "Chinese simplified", "简体中文", map[string][]string{ + feature: { + "功能", + }, + rule: { + "Rule", + }, + background: { + "背景", + }, + scenario: { + "场景", + "剧本", + }, + scenarioOutline: { + "场景大纲", + "剧本大纲", + }, + examples: { + "例子", + }, + given: { + "* ", + "假如", + "假设", + "假定", + }, + when: { + "* ", + "当", + }, + then: { + "* ", + "那么", + }, + and: { + "* ", + "而且", + "并且", + "同时", + }, + but: { + "* ", + "但是", + }, + }, + map[string]messages.StepKeywordType{ + "假如": messages.StepKeywordType_CONTEXT, + "假设": messages.StepKeywordType_CONTEXT, + "假定": messages.StepKeywordType_CONTEXT, + + "当": messages.StepKeywordType_ACTION, + + "那么": messages.StepKeywordType_OUTCOME, + + "而且": messages.StepKeywordType_CONJUNCTION, + "并且": messages.StepKeywordType_CONJUNCTION, + "同时": messages.StepKeywordType_CONJUNCTION, + + "但是": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "zh-TW": &Dialect{ + "zh-TW", "Chinese traditional", "繁體中文", map[string][]string{ + feature: { + "功能", + }, + rule: { + "Rule", + }, + background: { + "背景", + }, + scenario: { + "場景", + "劇本", + }, + scenarioOutline: { + "場景大綱", + "劇本大綱", + }, + examples: { + "例子", + }, + given: { + "* ", + "假如", + "假設", + "假定", + }, + when: { + "* ", + "當", + }, + then: { + "* ", + "那麼", + }, + and: { + "* ", + "而且", + "並且", + "同時", + }, + but: { + "* ", + "但是", + }, + }, + map[string]messages.StepKeywordType{ + "假如": messages.StepKeywordType_CONTEXT, + "假設": messages.StepKeywordType_CONTEXT, + "假定": messages.StepKeywordType_CONTEXT, + + "當": messages.StepKeywordType_ACTION, + + "那麼": messages.StepKeywordType_OUTCOME, + + "而且": messages.StepKeywordType_CONJUNCTION, + "並且": messages.StepKeywordType_CONJUNCTION, + "同時": messages.StepKeywordType_CONJUNCTION, + + "但是": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, + "mr": &Dialect{ + "mr", "Marathi", "मराठी", map[string][]string{ + feature: { + "वैशिष्ट्य", + "सुविधा", + }, + rule: { + "नियम", + }, + background: { + "पार्श्वभूमी", + }, + scenario: { + "परिदृश्य", + }, + scenarioOutline: { + "परिदृश्य रूपरेखा", + }, + examples: { + "उदाहरण", + }, + given: { + "* ", + "जर", + "दिलेल्या प्रमाणे ", + }, + when: { + "* ", + "जेव्हा ", + }, + then: { + "* ", + "मग ", + "तेव्हा ", + }, + and: { + "* ", + "आणि ", + "तसेच ", + }, + but: { + "* ", + "पण ", + "परंतु ", + }, + }, + map[string]messages.StepKeywordType{ + "जर": messages.StepKeywordType_CONTEXT, + "दिलेल्या प्रमाणे ": messages.StepKeywordType_CONTEXT, + + "जेव्हा ": messages.StepKeywordType_ACTION, + + "मग ": messages.StepKeywordType_OUTCOME, + "तेव्हा ": messages.StepKeywordType_OUTCOME, + + "आणि ": messages.StepKeywordType_CONJUNCTION, + "तसेच ": messages.StepKeywordType_CONJUNCTION, + + "पण ": messages.StepKeywordType_CONJUNCTION, + "परंतु ": messages.StepKeywordType_CONJUNCTION, + + "* ": messages.StepKeywordType_UNKNOWN, + }}, +} diff --git a/vendor/github.com/cucumber/common/gherkin/go/v24/dialects_builtin.go.jq b/vendor/github.com/cucumber/common/gherkin/go/v24/dialects_builtin.go.jq new file mode 100644 index 0000000..5c29e91 --- /dev/null +++ b/vendor/github.com/cucumber/common/gherkin/go/v24/dialects_builtin.go.jq @@ -0,0 +1,103 @@ +. as $root +| ( + [ to_entries[] + | [ + "\t",(.key|@json),": &Dialect{\n", + "\t\t", (.key|@json),", ", (.value.name|@json),", ", (.value.native|@json), ", map[string][]string{\n" + ] + ( + [ .value + | {"feature","rule","background","scenario","scenarioOutline","examples","given","when","then","and","but"} + | to_entries[] + | "\t\t\t"+(.key), ": {\n", + ([ .value[] | "\t\t\t\t", @json, ",\n" ]|add), + "\t\t\t},\n" + ] + ) + [ + "\t\t},\n", + "map[string]messages.StepKeywordType {\n" + ] + ( + [ .value.given + | ( + [ .[] | select(. != "* ") | + "\t\t\t\t", + @json, + ": messages.StepKeywordType_CONTEXT", + ",\n" + ] | add + ), + "\t\t\t\n" + ] + + + [ .value.when + | ( + [ .[] | select(. != "* ") | + "\t\t\t\t", + @json, + ": messages.StepKeywordType_ACTION", + ",\n" + ] | add + ), + "\t\t\t\n" + ] + + + [ .value.then + | ( + [ .[] | select(. != "* ") | + "\t\t\t\t", + @json, + ": messages.StepKeywordType_OUTCOME", + ",\n" + ] | add + ), + "\t\t\t\n" + ] + + + [ .value.and + | ( + [ .[] | select(. != "* ") | + "\t\t\t\t", + @json, + ": messages.StepKeywordType_CONJUNCTION", + ",\n" + ] | add + ), + "\t\t\t\n" + ] + + + [ .value.but + | ( + [ .[] | select(. != "* ") | + "\t\t\t\t", + @json, + ": messages.StepKeywordType_CONJUNCTION", + ",\n" + ] | add + ), + "\t\t\t\n" + ] + + [ + "\"* \": messages.StepKeywordType_UNKNOWN,\n" + ] + ) + [ + "}", + "\t},\n" + ] + | add + ] + | add + ) +| "package gherkin\n\n" ++ "import messages \"github.com/cucumber/common/messages/go/v18\"\n\n" ++ "// Builtin dialects for " + ([ $root | to_entries[] | .key+" ("+.value.name+")" ] | join(", ")) + "\n" ++ "func DialectsBuiltin() DialectProvider {\n" ++ "\treturn builtinDialects\n" ++ "}\n\n" ++ "const (\n" ++ ( + ["feature","rule","background","scenario","scenarioOutline","examples","given","when","then","and","but"] + | [ .[] | "\t" + . + " = " + (.|@json) + "\n" ] + | add ) ++ ")\n\n" ++ "var builtinDialects = gherkinDialectMap{\n" ++ . ++ "}\n" diff --git a/vendor/github.com/cucumber/gherkin-go/v19/gherkin-languages.json b/vendor/github.com/cucumber/common/gherkin/go/v24/gherkin-languages.json similarity index 98% rename from vendor/github.com/cucumber/gherkin-go/v19/gherkin-languages.json rename to vendor/github.com/cucumber/common/gherkin/go/v24/gherkin-languages.json index 9f55ea1..b5fb256 100644 --- a/vendor/github.com/cucumber/gherkin-go/v19/gherkin-languages.json +++ b/vendor/github.com/cucumber/common/gherkin/go/v24/gherkin-languages.json @@ -303,7 +303,7 @@ "name": "Bulgarian", "native": "български", "rule": [ - "Rule" + "Правило" ], "scenario": [ "Пример", @@ -967,9 +967,12 @@ ], "when": [ "* ", - "Tha ", - "Þa ", - "Ða " + "Bæþsealf ", + "Bæþsealfa ", + "Bæþsealfe ", + "Ciricæw ", + "Ciricæwe ", + "Ciricæwa " ] }, "en-pirate": { @@ -1013,6 +1016,46 @@ "* ", "Blimey! " ] + }, + "en-tx": { + "and": [ + "Come hell or high water " + ], + "background": [ + "Lemme tell y'all a story" + ], + "but": [ + "Well now hold on, I'll you what " + ], + "examples": [ + "Now that's a story longer than a cattle drive in July" + ], + "feature": [ + "This ain’t my first rodeo", + "All gussied up" + ], + "given": [ + "Fixin' to ", + "All git out " + ], + "name": "Texas", + "native": "Texas", + "rule": [ + "Rule " + ], + "scenario": [ + "All hat and no cattle" + ], + "scenarioOutline": [ + "Serious as a snake bite", + "Busy as a hound in flea season" + ], + "then": [ + "There’s no tree but bears some fruit " + ], + "when": [ + "Quick out of the chute " + ] }, "eo": { "and": [ @@ -1523,7 +1566,7 @@ "name": "Hindi", "native": "हिंदी", "rule": [ - "Rule" + "नियम" ], "scenario": [ "परिदृश्य" @@ -2355,7 +2398,7 @@ "and": [ "* ", "र ", - "अनी " + "अनि " ], "background": [ "पृष्ठभूमी" @@ -2566,7 +2609,8 @@ "name": "Polish", "native": "polski", "rule": [ - "Rule" + "Zasada", + "Reguła" ], "scenario": [ "Przykład", @@ -2902,7 +2946,7 @@ "name": "Serbian", "native": "Српски", "rule": [ - "Rule" + "Правило" ], "scenario": [ "Пример", @@ -2957,7 +3001,7 @@ "name": "Serbian (Latin)", "native": "Srpski (Latinica)", "rule": [ - "Rule" + "Pravilo" ], "scenario": [ "Scenario", @@ -3235,7 +3279,7 @@ "name": "Turkish", "native": "Türkçe", "rule": [ - "Rule" + "Kural" ], "scenario": [ "Örnek", @@ -3418,7 +3462,7 @@ ], "given": [ "* ", - "Агар " + "Belgilangan " ], "name": "Uzbek", "native": "Узбекча", diff --git a/vendor/github.com/cucumber/gherkin-go/v19/gherkin.berp b/vendor/github.com/cucumber/common/gherkin/go/v24/gherkin.berp similarity index 100% rename from vendor/github.com/cucumber/gherkin-go/v19/gherkin.berp rename to vendor/github.com/cucumber/common/gherkin/go/v24/gherkin.berp diff --git a/vendor/github.com/cucumber/gherkin-go/v19/gherkin.go b/vendor/github.com/cucumber/common/gherkin/go/v24/gherkin.go similarity index 92% rename from vendor/github.com/cucumber/gherkin-go/v19/gherkin.go rename to vendor/github.com/cucumber/common/gherkin/go/v24/gherkin.go index 40a395b..c97f7bf 100644 --- a/vendor/github.com/cucumber/gherkin-go/v19/gherkin.go +++ b/vendor/github.com/cucumber/common/gherkin/go/v24/gherkin.go @@ -3,7 +3,7 @@ package gherkin import ( "bufio" "fmt" - "github.com/cucumber/messages-go/v16" + "github.com/cucumber/common/messages/go/v19" "io" "strings" ) @@ -34,6 +34,7 @@ type Builder interface { type Token struct { Type TokenType Keyword string + KeywordType messages.StepKeywordType Text string Items []*LineSpan GherkinDialect string @@ -124,7 +125,7 @@ func (g *Line) StartsWith(prefix string) bool { } func ParseGherkinDocument(in io.Reader, newId func() string) (gherkinDocument *messages.GherkinDocument, err error) { - return ParseGherkinDocumentForLanguage(in, DEFAULT_DIALECT, newId) + return ParseGherkinDocumentForLanguage(in, DefaultDialect, newId) } func ParseGherkinDocumentForLanguage(in io.Reader, language string, newId func() string) (gherkinDocument *messages.GherkinDocument, err error) { @@ -132,7 +133,7 @@ func ParseGherkinDocumentForLanguage(in io.Reader, language string, newId func() builder := NewAstBuilder(newId) parser := NewParser(builder) parser.StopAtFirstError(false) - matcher := NewLanguageMatcher(GherkinDialectsBuildin(), language) + matcher := NewLanguageMatcher(DialectsBuiltin(), language) scanner := NewScanner(in) diff --git a/vendor/github.com/cucumber/gherkin-go/v19/matcher.go b/vendor/github.com/cucumber/common/gherkin/go/v24/matcher.go similarity index 81% rename from vendor/github.com/cucumber/gherkin-go/v19/matcher.go rename to vendor/github.com/cucumber/common/gherkin/go/v24/matcher.go index 52d23c5..fda4e68 100644 --- a/vendor/github.com/cucumber/gherkin-go/v19/matcher.go +++ b/vendor/github.com/cucumber/common/gherkin/go/v24/matcher.go @@ -8,38 +8,38 @@ import ( ) const ( - DEFAULT_DIALECT = "en" - COMMENT_PREFIX = "#" - TAG_PREFIX = "@" - TITLE_KEYWORD_SEPARATOR = ":" - TABLE_CELL_SEPARATOR = '|' - ESCAPE_CHAR = '\\' - ESCAPED_NEWLINE = 'n' - DOCSTRING_SEPARATOR = "\"\"\"" - DOCSTRING_ALTERNATIVE_SEPARATOR = "```" + DefaultDialect = "en" + CommentPrefix = "#" + TagPrefix = "@" + TitleKeywordSeparator = ":" + TableCellSeparator = '|' + EscapeChar = '\\' + EscapedNewline = 'n' + DocstringSeparator = "\"\"\"" + DocstringAlternativeSeparator = "```" ) type matcher struct { - gdp GherkinDialectProvider + gdp DialectProvider defaultLang string lang string - dialect *GherkinDialect + dialect *Dialect activeDocStringSeparator string indentToRemove int languagePattern *regexp.Regexp } -func NewMatcher(gdp GherkinDialectProvider) Matcher { +func NewMatcher(gdp DialectProvider) Matcher { return &matcher{ gdp: gdp, - defaultLang: DEFAULT_DIALECT, - lang: DEFAULT_DIALECT, - dialect: gdp.GetDialect(DEFAULT_DIALECT), + defaultLang: DefaultDialect, + lang: DefaultDialect, + dialect: gdp.GetDialect(DefaultDialect), languagePattern: regexp.MustCompile("^\\s*#\\s*language\\s*:\\s*([a-zA-Z\\-_]+)\\s*$"), } } -func NewLanguageMatcher(gdp GherkinDialectProvider, language string) Matcher { +func NewLanguageMatcher(gdp DialectProvider, language string) Matcher { return &matcher{ gdp: gdp, defaultLang: language, @@ -83,7 +83,7 @@ func (m *matcher) MatchEmpty(line *Line) (ok bool, token *Token, err error) { } func (m *matcher) MatchComment(line *Line) (ok bool, token *Token, err error) { - if line.StartsWith(COMMENT_PREFIX) { + if line.StartsWith(CommentPrefix) { token, ok = m.newTokenAtLocation(line.LineNumber, 0), true token.Type = TokenTypeComment token.Text = line.LineText @@ -92,15 +92,15 @@ func (m *matcher) MatchComment(line *Line) (ok bool, token *Token, err error) { } func (m *matcher) MatchTagLine(line *Line) (ok bool, token *Token, err error) { - if !line.StartsWith(TAG_PREFIX) { + if !line.StartsWith(TagPrefix) { return } - commentDelimiter := regexp.MustCompile(`\s+` + COMMENT_PREFIX) + commentDelimiter := regexp.MustCompile(`\s+` + CommentPrefix) uncommentedLine := commentDelimiter.Split(line.TrimmedLineText, 2)[0] var tags []*LineSpan var column = line.Indent() + 1 - splits := strings.Split(uncommentedLine, TAG_PREFIX) + splits := strings.Split(uncommentedLine, TagPrefix) for i := range splits { txt := strings.TrimRightFunc(splits[i], func(r rune) bool { return unicode.IsSpace(r) @@ -114,7 +114,7 @@ func (m *matcher) MatchTagLine(line *Line) (ok bool, token *Token, err error) { err = &parseError{msg, location} break } - tags = append(tags, &LineSpan{column, TAG_PREFIX + txt}) + tags = append(tags, &LineSpan{column, TagPrefix + txt}) column = column + utf8.RuneCountInString(splits[i]) + 1 } @@ -128,7 +128,7 @@ func (m *matcher) MatchTagLine(line *Line) (ok bool, token *Token, err error) { func (m *matcher) matchTitleLine(line *Line, tokenType TokenType, keywords []string) (ok bool, token *Token, err error) { for i := range keywords { keyword := keywords[i] - if line.StartsWith(keyword + TITLE_KEYWORD_SEPARATOR) { + if line.StartsWith(keyword + TitleKeywordSeparator) { token, ok = m.newTokenAtLocation(line.LineNumber, line.Indent()), true token.Type = tokenType token.Keyword = keyword @@ -167,6 +167,7 @@ func (m *matcher) MatchStepLine(line *Line) (ok bool, token *Token, err error) { token, ok = m.newTokenAtLocation(line.LineNumber, line.Indent()), true token.Type = TokenTypeStepLine token.Keyword = keyword + token.KeywordType = m.dialect.StepKeywordType(keyword) token.Text = strings.Trim(line.TrimmedLineText[len(keyword):], " ") return } @@ -187,10 +188,10 @@ func (m *matcher) MatchDocStringSeparator(line *Line) (ok bool, token *Token, er } return } - if line.StartsWith(DOCSTRING_SEPARATOR) { - m.activeDocStringSeparator = DOCSTRING_SEPARATOR - } else if line.StartsWith(DOCSTRING_ALTERNATIVE_SEPARATOR) { - m.activeDocStringSeparator = DOCSTRING_ALTERNATIVE_SEPARATOR + if line.StartsWith(DocstringSeparator) { + m.activeDocStringSeparator = DocstringSeparator + } else if line.StartsWith(DocstringAlternativeSeparator) { + m.activeDocStringSeparator = DocstringAlternativeSeparator } if m.activeDocStringSeparator != "" { // open @@ -210,7 +211,7 @@ func isSpaceAndNotNewLine(r rune) bool { func (m *matcher) MatchTableRow(line *Line) (ok bool, token *Token, err error) { var firstChar, firstPos = utf8.DecodeRuneInString(line.TrimmedLineText) - if firstChar == TABLE_CELL_SEPARATOR { + if firstChar == TableCellSeparator { var cells []*LineSpan var cell []rune var startCol = line.Indent() + 2 // column where the current cell started @@ -218,7 +219,7 @@ func (m *matcher) MatchTableRow(line *Line) (ok bool, token *Token, err error) { for i, w, col := firstPos, 0, startCol; i < len(line.TrimmedLineText); i += w { var char rune char, w = utf8.DecodeRuneInString(line.TrimmedLineText[i:]) - if char == TABLE_CELL_SEPARATOR { + if char == TableCellSeparator { // append current cell txt := string(cell) @@ -229,16 +230,16 @@ func (m *matcher) MatchTableRow(line *Line) (ok bool, token *Token, err error) { // start building next cell = make([]rune, 0) startCol = col + 1 - } else if char == ESCAPE_CHAR { + } else if char == EscapeChar { // skip this character but count the column i += w col++ char, w = utf8.DecodeRuneInString(line.TrimmedLineText[i:]) - if char == ESCAPED_NEWLINE { + if char == EscapedNewline { cell = append(cell, '\n') } else { - if char != TABLE_CELL_SEPARATOR && char != ESCAPE_CHAR { - cell = append(cell, ESCAPE_CHAR) + if char != TableCellSeparator && char != EscapeChar { + cell = append(cell, EscapeChar) } cell = append(cell, char) } @@ -290,11 +291,11 @@ func (m *matcher) MatchOther(line *Line) (ok bool, token *Token, err error) { } func (m *matcher) unescapeDocString(text string) string { - if m.activeDocStringSeparator == DOCSTRING_SEPARATOR { - return strings.Replace(text, "\\\"\\\"\\\"", DOCSTRING_SEPARATOR, -1) + if m.activeDocStringSeparator == DocstringSeparator { + return strings.Replace(text, "\\\"\\\"\\\"", DocstringSeparator, -1) } - if m.activeDocStringSeparator == DOCSTRING_ALTERNATIVE_SEPARATOR { - return strings.Replace(text, "\\`\\`\\`", DOCSTRING_ALTERNATIVE_SEPARATOR, -1) + if m.activeDocStringSeparator == DocstringAlternativeSeparator { + return strings.Replace(text, "\\`\\`\\`", DocstringAlternativeSeparator, -1) } return text } diff --git a/vendor/github.com/cucumber/gherkin-go/v19/messages.go b/vendor/github.com/cucumber/common/gherkin/go/v24/messages.go similarity index 98% rename from vendor/github.com/cucumber/gherkin-go/v19/messages.go rename to vendor/github.com/cucumber/common/gherkin/go/v24/messages.go index a627680..6061856 100644 --- a/vendor/github.com/cucumber/gherkin-go/v19/messages.go +++ b/vendor/github.com/cucumber/common/gherkin/go/v24/messages.go @@ -3,7 +3,7 @@ package gherkin import ( "encoding/json" "fmt" - "github.com/cucumber/messages-go/v16" + "github.com/cucumber/common/messages/go/v19" "io" "io/ioutil" "strings" diff --git a/vendor/github.com/cucumber/gherkin-go/v19/parser.go b/vendor/github.com/cucumber/common/gherkin/go/v24/parser.go similarity index 100% rename from vendor/github.com/cucumber/gherkin-go/v19/parser.go rename to vendor/github.com/cucumber/common/gherkin/go/v24/parser.go diff --git a/vendor/github.com/cucumber/gherkin-go/v19/parser.go.razor b/vendor/github.com/cucumber/common/gherkin/go/v24/parser.go.razor similarity index 100% rename from vendor/github.com/cucumber/gherkin-go/v19/parser.go.razor rename to vendor/github.com/cucumber/common/gherkin/go/v24/parser.go.razor diff --git a/vendor/github.com/cucumber/gherkin-go/v19/pickles.go b/vendor/github.com/cucumber/common/gherkin/go/v24/pickles.go similarity index 87% rename from vendor/github.com/cucumber/gherkin-go/v19/pickles.go rename to vendor/github.com/cucumber/common/gherkin/go/v24/pickles.go index a905042..5e472ff 100644 --- a/vendor/github.com/cucumber/gherkin-go/v19/pickles.go +++ b/vendor/github.com/cucumber/common/gherkin/go/v24/pickles.go @@ -1,7 +1,7 @@ package gherkin import ( - "github.com/cucumber/messages-go/v16" + "github.com/cucumber/common/messages/go/v19" "strings" ) @@ -91,13 +91,15 @@ func compileScenarioOutline( } // translate computedPickleSteps based on valuesRow + previous := messages.PickleStepType_UNKNOWN for _, step := range scenario.Steps { text := step.Text for i, variableCell := range variableCells { text = strings.Replace(text, "<"+variableCell.Value+">", valueCells[i].Value, -1) } - pickleStep := pickleStep(step, variableCells, valuesRow, newId) + pickleStep := pickleStep(step, variableCells, valuesRow, newId, previous) + previous = pickleStep.Type computedPickleSteps = append(computedPickleSteps, pickleStep) } @@ -190,8 +192,10 @@ func pickleTags(tags []*messages.Tag) []*messages.PickleTag { func pickleSteps(steps []*messages.Step, newId func() string) []*messages.PickleStep { pickleSteps := make([]*messages.PickleStep, len(steps)) + previous := messages.PickleStepType_UNKNOWN for i, step := range steps { - pickleStep := pickleStep(step, nil, nil, newId) + pickleStep := pickleStep(step, nil, nil, newId, previous) + previous = pickleStep.Type pickleSteps[i] = pickleStep } return pickleSteps @@ -201,7 +205,9 @@ func pickleStep( step *messages.Step, variableCells []*messages.TableCell, valuesRow *messages.TableRow, - newId func() string) *messages.PickleStep { + newId func() string, + previous messages.PickleStepType, +) *messages.PickleStep { var valueCells []*messages.TableCell if valuesRow != nil { @@ -211,6 +217,7 @@ func pickleStep( pickleStep := &messages.PickleStep{ Id: newId(), Text: interpolate(step.Text, variableCells, valueCells), + Type: mapType(step.KeywordType, previous), AstNodeIds: []string{step.Id}, } if valuesRow != nil { @@ -229,6 +236,23 @@ func pickleStep( return pickleStep } +func mapType(keywordType messages.StepKeywordType, previous messages.PickleStepType) messages.PickleStepType { + switch keywordType { + case messages.StepKeywordType_UNKNOWN: + return messages.PickleStepType_UNKNOWN + case messages.StepKeywordType_CONTEXT: + return messages.PickleStepType_CONTEXT + case messages.StepKeywordType_ACTION: + return messages.PickleStepType_ACTION + case messages.StepKeywordType_OUTCOME: + return messages.PickleStepType_OUTCOME + case messages.StepKeywordType_CONJUNCTION: + return previous + default: + panic("Bad enum value for StepKeywordType") + } +} + func interpolate(s string, variableCells []*messages.TableCell, valueCells []*messages.TableCell) string { if variableCells == nil || valueCells == nil { return s diff --git a/vendor/github.com/cucumber/gherkin-go/v19/test.feature b/vendor/github.com/cucumber/common/gherkin/go/v24/test.feature similarity index 100% rename from vendor/github.com/cucumber/gherkin-go/v19/test.feature rename to vendor/github.com/cucumber/common/gherkin/go/v24/test.feature diff --git a/vendor/github.com/cucumber/gherkin-go/v19/test.sh b/vendor/github.com/cucumber/common/gherkin/go/v24/test.sh similarity index 100% rename from vendor/github.com/cucumber/gherkin-go/v19/test.sh rename to vendor/github.com/cucumber/common/gherkin/go/v24/test.sh diff --git a/vendor/github.com/cucumber/messages-go/v16/.gitignore b/vendor/github.com/cucumber/common/messages/go/v19/.gitignore similarity index 100% rename from vendor/github.com/cucumber/messages-go/v16/.gitignore rename to vendor/github.com/cucumber/common/messages/go/v19/.gitignore diff --git a/vendor/github.com/cucumber/messages-go/v16/.rsync b/vendor/github.com/cucumber/common/messages/go/v19/.rsync similarity index 100% rename from vendor/github.com/cucumber/messages-go/v16/.rsync rename to vendor/github.com/cucumber/common/messages/go/v19/.rsync diff --git a/vendor/github.com/cucumber/messages-go/v16/.subrepo b/vendor/github.com/cucumber/common/messages/go/v19/.subrepo similarity index 100% rename from vendor/github.com/cucumber/messages-go/v16/.subrepo rename to vendor/github.com/cucumber/common/messages/go/v19/.subrepo diff --git a/vendor/github.com/cucumber/messages-go/v16/LICENSE b/vendor/github.com/cucumber/common/messages/go/v19/LICENSE similarity index 100% rename from vendor/github.com/cucumber/messages-go/v16/LICENSE rename to vendor/github.com/cucumber/common/messages/go/v19/LICENSE diff --git a/vendor/github.com/cucumber/common/messages/go/v19/Makefile b/vendor/github.com/cucumber/common/messages/go/v19/Makefile new file mode 100644 index 0000000..62171a8 --- /dev/null +++ b/vendor/github.com/cucumber/common/messages/go/v19/Makefile @@ -0,0 +1,9 @@ +include default.mk + +JSONSCHEMAS = $(shell find ../jsonschema -name "*.json") + +.deps: messages.go + +messages.go: $(JSONSCHEMAS) ../jsonschema/scripts/codegen.rb ../jsonschema/scripts/templates/go.go.erb ../jsonschema/scripts/templates/go.enum.go.erb + ruby ../jsonschema/scripts/codegen.rb Go ../jsonschema go.go.erb > $@ + ruby ../jsonschema/scripts/codegen.rb Go ../jsonschema go.enum.go.erb >> $@ diff --git a/vendor/github.com/cucumber/messages-go/v16/default.mk b/vendor/github.com/cucumber/common/messages/go/v19/default.mk similarity index 77% rename from vendor/github.com/cucumber/messages-go/v16/default.mk rename to vendor/github.com/cucumber/common/messages/go/v19/default.mk index 08a4e6c..d90e523 100644 --- a/vendor/github.com/cucumber/messages-go/v16/default.mk +++ b/vendor/github.com/cucumber/common/messages/go/v19/default.mk @@ -10,16 +10,14 @@ EXE_BASE_NAME := cucumber-$(LIBNAME) LDFLAGS := "-X main.version=${NEW_VERSION}" # Enumerating Cross compilation targets -PLATFORMS = darwin-amd64 linux-386 linux-amd64 linux-arm freebsd-386 freebsd-amd64 openbsd-386 openbsd-amd64 windows-386 windows-amd64 freebsd-arm netbsd-386 netbsd-amd64 netbsd-arm +PLATFORMS = darwin-amd64 linux-386 linux-amd64 linux-arm linux-arm64 freebsd-386 freebsd-amd64 openbsd-386 openbsd-amd64 windows-386 windows-amd64 freebsd-arm netbsd-386 netbsd-amd64 netbsd-arm PLATFORM = $(patsubst dist/$(EXE_BASE_NAME)-%,%,$@) OS_ARCH = $(subst -, ,$(PLATFORM)) X-OS = $(word 1, $(OS_ARCH)) X-ARCH = $(word 2, $(OS_ARCH)) -# Determine if we're on linux or osx (ignoring other OSes as we're not building on them) -OS := $(shell [[ "$$(uname)" == "Darwin" ]] && echo "darwin" || echo "linux") -# Determine if we're on 386 or amd64 (ignoring other processors as we're not building on them) -ARCH := $(shell [[ "$$(uname -m)" == "x86_64" ]] && echo "amd64" || echo "386") +OS := $(shell go env GOOS) +ARCH := $(shell go env GOARCH) EXE := dist/$(EXE_BASE_NAME)-$(OS)-$(ARCH) ifndef NO_CROSS_COMPILE @@ -28,8 +26,8 @@ else EXES = $(EXE) endif -GO_REPLACEMENTS := $(shell sed -n "/^\s*github.com\/cucumber/p" go.mod | perl -wpe 's/\s*(github.com\/cucumber\/(.*)-go\/v\d+).*/q{replace } . $$1 . q{ => ..\/..\/} . $$2 . q{\/go}/eg') -CURRENT_MAJOR := $(shell sed -n "/^module/p" go.mod | awk '{ print $$0 "/v1" }' | cut -d'/' -f4 | cut -d'v' -f2) +GO_REPLACEMENTS := $(shell sed -n "/^\s*github.com\/cucumber\/common/p" go.mod | perl -wpe 's/\s*(github.com\/cucumber\/common\/(.*)\/go\/v\d+).*/q{replace } . $$1 . q{ => ..\/..\/} . $$2 . q{\/go}/eg') +CURRENT_MAJOR := $(shell sed -n "/^module/p" go.mod | awk '{ print $$0 "/v1" }' | cut -d'/' -f6 | cut -d'v' -f2) NEW_MAJOR := $(shell echo ${NEW_VERSION} | awk -F'.' '{print $$1}') GO_MAJOR_V = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1) @@ -53,7 +51,7 @@ endif dist: $(EXES) -dist/$(EXE_BASE_NAME)-%: .deps $(GO_SOURCE_FILES) +dist/$(EXE_BASE_NAME)-%: .deps $(GO_SOURCE_FILES) go.mod mkdir -p dist echo "EXES=$(EXES)" echo "Building $@" @@ -102,7 +100,13 @@ else endif else publish: - # no-op +ifdef NEW_VERSION + git tag --sign "$(LIBNAME)/go/v$(NEW_VERSION)" -m "Release $(LIBNAME)/go v$(NEW_VERSION)" + git push --tags +else + @echo -e "\033[0;31mNEW_VERSION is not defined. Can't publish :-(\033[0m" + exit 1 +endif endif .PHONY: publish @@ -115,6 +119,14 @@ endif touch $@ post-release: add-replaces +ifdef NEW_VERSION + pushd ../.. && \ + source scripts/functions.sh && update_go_library_version $(LIBNAME) $(NEW_VERSION) && \ + popd +else + @echo -e "\033[0;31mNEW_VERSION is not defined. Can't post-release :-(\033[0m" + exit 1 +endif .PHONY: post-release clean: clean-go @@ -142,8 +154,8 @@ ifeq ($(CURRENT_MAJOR), $(NEW_MAJOR)) # echo "No major version change" else echo "Updating major from $(CURRENT_MAJOR) to $(NEW_MAJOR)" - sed -Ei "s/$(LIBNAME)-go(\/v$(CURRENT_MAJOR))?/$(LIBNAME)-go\/v$(NEW_MAJOR)/" go.mod - sed -Ei "s/$(LIBNAME)-go(\/v$(CURRENT_MAJOR))?/$(LIBNAME)-go\/v$(NEW_MAJOR)/" $(shell find . -name "*.go") + sed -Ei "s/$(LIBNAME)\/go(\/v$(CURRENT_MAJOR))?/$(LIBNAME)\/go\/v$(NEW_MAJOR)/" go.mod + sed -Ei "s/$(LIBNAME)\/go(\/v$(CURRENT_MAJOR))?/$(LIBNAME)\/go\/v$(NEW_MAJOR)/" $(shell find . -name "*.go") endif .PHONY: update-major diff --git a/vendor/github.com/cucumber/messages-go/v16/id_generator.go b/vendor/github.com/cucumber/common/messages/go/v19/id_generator.go similarity index 100% rename from vendor/github.com/cucumber/messages-go/v16/id_generator.go rename to vendor/github.com/cucumber/common/messages/go/v19/id_generator.go diff --git a/vendor/github.com/cucumber/messages-go/v16/messages.go b/vendor/github.com/cucumber/common/messages/go/v19/messages.go similarity index 86% rename from vendor/github.com/cucumber/messages-go/v16/messages.go rename to vendor/github.com/cucumber/common/messages/go/v19/messages.go index 59f817b..b87e7f8 100644 --- a/vendor/github.com/cucumber/messages-go/v16/messages.go +++ b/vendor/github.com/cucumber/common/messages/go/v19/messages.go @@ -122,12 +122,13 @@ type Scenario struct { } type Step struct { - Location *Location `json:"location"` - Keyword string `json:"keyword"` - Text string `json:"text"` - DocString *DocString `json:"docString,omitempty"` - DataTable *DataTable `json:"dataTable,omitempty"` - Id string `json:"id"` + Location *Location `json:"location"` + Keyword string `json:"keyword"` + KeywordType StepKeywordType `json:"keywordType,omitempty"` + Text string `json:"text"` + DocString *DocString `json:"docString,omitempty"` + DataTable *DataTable `json:"dataTable,omitempty"` + Id string `json:"id"` } type TableCell struct { @@ -149,6 +150,7 @@ type Tag struct { type Hook struct { Id string `json:"id"` + Name string `json:"name,omitempty"` SourceReference *SourceReference `json:"sourceReference"` TagExpression string `json:"tagExpression,omitempty"` } @@ -168,9 +170,10 @@ type Meta struct { } type Ci struct { - Name string `json:"name"` - Url string `json:"url,omitempty"` - Git *Git `json:"git,omitempty"` + Name string `json:"name"` + Url string `json:"url,omitempty"` + BuildNumber string `json:"buildNumber,omitempty"` + Git *Git `json:"git,omitempty"` } type Git struct { @@ -217,6 +220,7 @@ type PickleStep struct { Argument *PickleStepArgument `json:"argument,omitempty"` AstNodeIds []string `json:"astNodeIds"` Id string `json:"id"` + Type PickleStepType `json:"type,omitempty"` Text string `json:"text"` } @@ -310,6 +314,7 @@ type TestStep struct { type TestCaseFinished struct { TestCaseStartedId string `json:"testCaseStartedId"` Timestamp *Timestamp `json:"timestamp"` + WillBeRetried bool `json:"willBeRetried"` } type TestCaseStarted struct { @@ -337,10 +342,9 @@ type TestStepFinished struct { } type TestStepResult struct { - Duration *Duration `json:"duration"` - Message string `json:"message,omitempty"` - Status TestStepResultStatus `json:"status"` - WillBeRetried bool `json:"willBeRetried"` + Duration *Duration `json:"duration"` + Message string `json:"message,omitempty"` + Status TestStepResultStatus `json:"status"` } type TestStepStarted struct { @@ -377,6 +381,30 @@ func (e AttachmentContentEncoding) String() string { } } +type PickleStepType string + +const ( + PickleStepType_UNKNOWN PickleStepType = "Unknown" + PickleStepType_CONTEXT PickleStepType = "Context" + PickleStepType_ACTION PickleStepType = "Action" + PickleStepType_OUTCOME PickleStepType = "Outcome" +) + +func (e PickleStepType) String() string { + switch e { + case PickleStepType_UNKNOWN: + return "Unknown" + case PickleStepType_CONTEXT: + return "Context" + case PickleStepType_ACTION: + return "Action" + case PickleStepType_OUTCOME: + return "Outcome" + default: + panic("Bad enum value for PickleStepType") + } +} + type SourceMediaType string const ( @@ -413,6 +441,33 @@ func (e StepDefinitionPatternType) String() string { } } +type StepKeywordType string + +const ( + StepKeywordType_UNKNOWN StepKeywordType = "Unknown" + StepKeywordType_CONTEXT StepKeywordType = "Context" + StepKeywordType_ACTION StepKeywordType = "Action" + StepKeywordType_OUTCOME StepKeywordType = "Outcome" + StepKeywordType_CONJUNCTION StepKeywordType = "Conjunction" +) + +func (e StepKeywordType) String() string { + switch e { + case StepKeywordType_UNKNOWN: + return "Unknown" + case StepKeywordType_CONTEXT: + return "Context" + case StepKeywordType_ACTION: + return "Action" + case StepKeywordType_OUTCOME: + return "Outcome" + case StepKeywordType_CONJUNCTION: + return "Conjunction" + default: + panic("Bad enum value for StepKeywordType") + } +} + type TestStepResultStatus string const ( diff --git a/vendor/github.com/cucumber/messages-go/v16/time_conversion.go b/vendor/github.com/cucumber/common/messages/go/v19/time_conversion.go similarity index 100% rename from vendor/github.com/cucumber/messages-go/v16/time_conversion.go rename to vendor/github.com/cucumber/common/messages/go/v19/time_conversion.go diff --git a/vendor/github.com/cucumber/gherkin-go/v19/dialect.go b/vendor/github.com/cucumber/gherkin-go/v19/dialect.go deleted file mode 100644 index 0fd781a..0000000 --- a/vendor/github.com/cucumber/gherkin-go/v19/dialect.go +++ /dev/null @@ -1,51 +0,0 @@ -package gherkin - -type GherkinDialect struct { - Language string - Name string - Native string - Keywords map[string][]string -} - -func (g *GherkinDialect) FeatureKeywords() []string { - return g.Keywords["feature"] -} - -func (g *GherkinDialect) RuleKeywords() []string { - return g.Keywords["rule"] -} - -func (g *GherkinDialect) ScenarioKeywords() []string { - return g.Keywords["scenario"] -} - -func (g *GherkinDialect) StepKeywords() []string { - result := g.Keywords["given"] - result = append(result, g.Keywords["when"]...) - result = append(result, g.Keywords["then"]...) - result = append(result, g.Keywords["and"]...) - result = append(result, g.Keywords["but"]...) - return result -} - -func (g *GherkinDialect) BackgroundKeywords() []string { - return g.Keywords["background"] -} - -func (g *GherkinDialect) ScenarioOutlineKeywords() []string { - return g.Keywords["scenarioOutline"] -} - -func (g *GherkinDialect) ExamplesKeywords() []string { - return g.Keywords["examples"] -} - -type GherkinDialectProvider interface { - GetDialect(language string) *GherkinDialect -} - -type gherkinDialectMap map[string]*GherkinDialect - -func (g gherkinDialectMap) GetDialect(language string) *GherkinDialect { - return g[language] -} diff --git a/vendor/github.com/cucumber/gherkin-go/v19/dialects_builtin.go b/vendor/github.com/cucumber/gherkin-go/v19/dialects_builtin.go deleted file mode 100644 index 79dd3ad..0000000 --- a/vendor/github.com/cucumber/gherkin-go/v19/dialects_builtin.go +++ /dev/null @@ -1,3652 +0,0 @@ -package gherkin - -// Builtin dialects for af (Afrikaans), am (Armenian), an (Aragonese), ar (Arabic), ast (Asturian), az (Azerbaijani), bg (Bulgarian), bm (Malay), bs (Bosnian), ca (Catalan), cs (Czech), cy-GB (Welsh), da (Danish), de (German), el (Greek), em (Emoji), en (English), en-Scouse (Scouse), en-au (Australian), en-lol (LOLCAT), en-old (Old English), en-pirate (Pirate), eo (Esperanto), es (Spanish), et (Estonian), fa (Persian), fi (Finnish), fr (French), ga (Irish), gj (Gujarati), gl (Galician), he (Hebrew), hi (Hindi), hr (Croatian), ht (Creole), hu (Hungarian), id (Indonesian), is (Icelandic), it (Italian), ja (Japanese), jv (Javanese), ka (Georgian), kn (Kannada), ko (Korean), lt (Lithuanian), lu (Luxemburgish), lv (Latvian), mk-Cyrl (Macedonian), mk-Latn (Macedonian (Latin)), mn (Mongolian), ne (Nepali), nl (Dutch), no (Norwegian), pa (Panjabi), pl (Polish), pt (Portuguese), ro (Romanian), ru (Russian), sk (Slovak), sl (Slovenian), sr-Cyrl (Serbian), sr-Latn (Serbian (Latin)), sv (Swedish), ta (Tamil), th (Thai), te (Telugu), tlh (Klingon), tr (Turkish), tt (Tatar), uk (Ukrainian), ur (Urdu), uz (Uzbek), vi (Vietnamese), zh-CN (Chinese simplified), zh-TW (Chinese traditional), mr (Marathi) -func GherkinDialectsBuildin() GherkinDialectProvider { - return buildinDialects -} - -const ( - feature = "feature" - rule = "rule" - background = "background" - scenario = "scenario" - scenarioOutline = "scenarioOutline" - examples = "examples" - given = "given" - when = "when" - then = "then" - and = "and" - but = "but" -) - -var buildinDialects = gherkinDialectMap{ - "af": &GherkinDialect{ - "af", "Afrikaans", "Afrikaans", map[string][]string{ - feature: []string{ - "Funksie", - "Besigheid Behoefte", - "Vermoë", - }, - rule: []string{ - "Regel", - }, - background: []string{ - "Agtergrond", - }, - scenario: []string{ - "Voorbeeld", - "Situasie", - }, - scenarioOutline: []string{ - "Situasie Uiteensetting", - }, - examples: []string{ - "Voorbeelde", - }, - given: []string{ - "* ", - "Gegewe ", - }, - when: []string{ - "* ", - "Wanneer ", - }, - then: []string{ - "* ", - "Dan ", - }, - and: []string{ - "* ", - "En ", - }, - but: []string{ - "* ", - "Maar ", - }, - }, - }, - "am": &GherkinDialect{ - "am", "Armenian", "հայերեն", map[string][]string{ - feature: []string{ - "Ֆունկցիոնալություն", - "Հատկություն", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Կոնտեքստ", - }, - scenario: []string{ - "Օրինակ", - "Սցենար", - }, - scenarioOutline: []string{ - "Սցենարի կառուցվացքը", - }, - examples: []string{ - "Օրինակներ", - }, - given: []string{ - "* ", - "Դիցուք ", - }, - when: []string{ - "* ", - "Եթե ", - "Երբ ", - }, - then: []string{ - "* ", - "Ապա ", - }, - and: []string{ - "* ", - "Եվ ", - }, - but: []string{ - "* ", - "Բայց ", - }, - }, - }, - "an": &GherkinDialect{ - "an", "Aragonese", "Aragonés", map[string][]string{ - feature: []string{ - "Caracteristica", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Antecedents", - }, - scenario: []string{ - "Eixemplo", - "Caso", - }, - scenarioOutline: []string{ - "Esquema del caso", - }, - examples: []string{ - "Eixemplos", - }, - given: []string{ - "* ", - "Dau ", - "Dada ", - "Daus ", - "Dadas ", - }, - when: []string{ - "* ", - "Cuan ", - }, - then: []string{ - "* ", - "Alavez ", - "Allora ", - "Antonces ", - }, - and: []string{ - "* ", - "Y ", - "E ", - }, - but: []string{ - "* ", - "Pero ", - }, - }, - }, - "ar": &GherkinDialect{ - "ar", "Arabic", "العربية", map[string][]string{ - feature: []string{ - "خاصية", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "الخلفية", - }, - scenario: []string{ - "مثال", - "سيناريو", - }, - scenarioOutline: []string{ - "سيناريو مخطط", - }, - examples: []string{ - "امثلة", - }, - given: []string{ - "* ", - "بفرض ", - }, - when: []string{ - "* ", - "متى ", - "عندما ", - }, - then: []string{ - "* ", - "اذاً ", - "ثم ", - }, - and: []string{ - "* ", - "و ", - }, - but: []string{ - "* ", - "لكن ", - }, - }, - }, - "ast": &GherkinDialect{ - "ast", "Asturian", "asturianu", map[string][]string{ - feature: []string{ - "Carauterística", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Antecedentes", - }, - scenario: []string{ - "Exemplo", - "Casu", - }, - scenarioOutline: []string{ - "Esbozu del casu", - }, - examples: []string{ - "Exemplos", - }, - given: []string{ - "* ", - "Dáu ", - "Dada ", - "Daos ", - "Daes ", - }, - when: []string{ - "* ", - "Cuando ", - }, - then: []string{ - "* ", - "Entós ", - }, - and: []string{ - "* ", - "Y ", - "Ya ", - }, - but: []string{ - "* ", - "Peru ", - }, - }, - }, - "az": &GherkinDialect{ - "az", "Azerbaijani", "Azərbaycanca", map[string][]string{ - feature: []string{ - "Özəllik", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Keçmiş", - "Kontekst", - }, - scenario: []string{ - "Nümunə", - "Ssenari", - }, - scenarioOutline: []string{ - "Ssenarinin strukturu", - }, - examples: []string{ - "Nümunələr", - }, - given: []string{ - "* ", - "Tutaq ki ", - "Verilir ", - }, - when: []string{ - "* ", - "Əgər ", - "Nə vaxt ki ", - }, - then: []string{ - "* ", - "O halda ", - }, - and: []string{ - "* ", - "Və ", - "Həm ", - }, - but: []string{ - "* ", - "Amma ", - "Ancaq ", - }, - }, - }, - "bg": &GherkinDialect{ - "bg", "Bulgarian", "български", map[string][]string{ - feature: []string{ - "Функционалност", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Предистория", - }, - scenario: []string{ - "Пример", - "Сценарий", - }, - scenarioOutline: []string{ - "Рамка на сценарий", - }, - examples: []string{ - "Примери", - }, - given: []string{ - "* ", - "Дадено ", - }, - when: []string{ - "* ", - "Когато ", - }, - then: []string{ - "* ", - "То ", - }, - and: []string{ - "* ", - "И ", - }, - but: []string{ - "* ", - "Но ", - }, - }, - }, - "bm": &GherkinDialect{ - "bm", "Malay", "Bahasa Melayu", map[string][]string{ - feature: []string{ - "Fungsi", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Latar Belakang", - }, - scenario: []string{ - "Senario", - "Situasi", - "Keadaan", - }, - scenarioOutline: []string{ - "Kerangka Senario", - "Kerangka Situasi", - "Kerangka Keadaan", - "Garis Panduan Senario", - }, - examples: []string{ - "Contoh", - }, - given: []string{ - "* ", - "Diberi ", - "Bagi ", - }, - when: []string{ - "* ", - "Apabila ", - }, - then: []string{ - "* ", - "Maka ", - "Kemudian ", - }, - and: []string{ - "* ", - "Dan ", - }, - but: []string{ - "* ", - "Tetapi ", - "Tapi ", - }, - }, - }, - "bs": &GherkinDialect{ - "bs", "Bosnian", "Bosanski", map[string][]string{ - feature: []string{ - "Karakteristika", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Pozadina", - }, - scenario: []string{ - "Primjer", - "Scenariju", - "Scenario", - }, - scenarioOutline: []string{ - "Scenariju-obris", - "Scenario-outline", - }, - examples: []string{ - "Primjeri", - }, - given: []string{ - "* ", - "Dato ", - }, - when: []string{ - "* ", - "Kada ", - }, - then: []string{ - "* ", - "Zatim ", - }, - and: []string{ - "* ", - "I ", - "A ", - }, - but: []string{ - "* ", - "Ali ", - }, - }, - }, - "ca": &GherkinDialect{ - "ca", "Catalan", "català", map[string][]string{ - feature: []string{ - "Característica", - "Funcionalitat", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Rerefons", - "Antecedents", - }, - scenario: []string{ - "Exemple", - "Escenari", - }, - scenarioOutline: []string{ - "Esquema de l'escenari", - }, - examples: []string{ - "Exemples", - }, - given: []string{ - "* ", - "Donat ", - "Donada ", - "Atès ", - "Atesa ", - }, - when: []string{ - "* ", - "Quan ", - }, - then: []string{ - "* ", - "Aleshores ", - "Cal ", - }, - and: []string{ - "* ", - "I ", - }, - but: []string{ - "* ", - "Però ", - }, - }, - }, - "cs": &GherkinDialect{ - "cs", "Czech", "Česky", map[string][]string{ - feature: []string{ - "Požadavek", - }, - rule: []string{ - "Pravidlo", - }, - background: []string{ - "Pozadí", - "Kontext", - }, - scenario: []string{ - "Příklad", - "Scénář", - }, - scenarioOutline: []string{ - "Náčrt Scénáře", - "Osnova scénáře", - }, - examples: []string{ - "Příklady", - }, - given: []string{ - "* ", - "Pokud ", - "Za předpokladu ", - }, - when: []string{ - "* ", - "Když ", - }, - then: []string{ - "* ", - "Pak ", - }, - and: []string{ - "* ", - "A také ", - "A ", - }, - but: []string{ - "* ", - "Ale ", - }, - }, - }, - "cy-GB": &GherkinDialect{ - "cy-GB", "Welsh", "Cymraeg", map[string][]string{ - feature: []string{ - "Arwedd", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Cefndir", - }, - scenario: []string{ - "Enghraifft", - "Scenario", - }, - scenarioOutline: []string{ - "Scenario Amlinellol", - }, - examples: []string{ - "Enghreifftiau", - }, - given: []string{ - "* ", - "Anrhegedig a ", - }, - when: []string{ - "* ", - "Pryd ", - }, - then: []string{ - "* ", - "Yna ", - }, - and: []string{ - "* ", - "A ", - }, - but: []string{ - "* ", - "Ond ", - }, - }, - }, - "da": &GherkinDialect{ - "da", "Danish", "dansk", map[string][]string{ - feature: []string{ - "Egenskab", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Baggrund", - }, - scenario: []string{ - "Eksempel", - "Scenarie", - }, - scenarioOutline: []string{ - "Abstrakt Scenario", - }, - examples: []string{ - "Eksempler", - }, - given: []string{ - "* ", - "Givet ", - }, - when: []string{ - "* ", - "Når ", - }, - then: []string{ - "* ", - "Så ", - }, - and: []string{ - "* ", - "Og ", - }, - but: []string{ - "* ", - "Men ", - }, - }, - }, - "de": &GherkinDialect{ - "de", "German", "Deutsch", map[string][]string{ - feature: []string{ - "Funktionalität", - "Funktion", - }, - rule: []string{ - "Rule", - "Regel", - }, - background: []string{ - "Grundlage", - "Hintergrund", - "Voraussetzungen", - "Vorbedingungen", - }, - scenario: []string{ - "Beispiel", - "Szenario", - }, - scenarioOutline: []string{ - "Szenariogrundriss", - "Szenarien", - }, - examples: []string{ - "Beispiele", - }, - given: []string{ - "* ", - "Angenommen ", - "Gegeben sei ", - "Gegeben seien ", - }, - when: []string{ - "* ", - "Wenn ", - }, - then: []string{ - "* ", - "Dann ", - }, - and: []string{ - "* ", - "Und ", - }, - but: []string{ - "* ", - "Aber ", - }, - }, - }, - "el": &GherkinDialect{ - "el", "Greek", "Ελληνικά", map[string][]string{ - feature: []string{ - "Δυνατότητα", - "Λειτουργία", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Υπόβαθρο", - }, - scenario: []string{ - "Παράδειγμα", - "Σενάριο", - }, - scenarioOutline: []string{ - "Περιγραφή Σεναρίου", - "Περίγραμμα Σεναρίου", - }, - examples: []string{ - "Παραδείγματα", - "Σενάρια", - }, - given: []string{ - "* ", - "Δεδομένου ", - }, - when: []string{ - "* ", - "Όταν ", - }, - then: []string{ - "* ", - "Τότε ", - }, - and: []string{ - "* ", - "Και ", - }, - but: []string{ - "* ", - "Αλλά ", - }, - }, - }, - "em": &GherkinDialect{ - "em", "Emoji", "😀", map[string][]string{ - feature: []string{ - "📚", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "💤", - }, - scenario: []string{ - "🥒", - "📕", - }, - scenarioOutline: []string{ - "📖", - }, - examples: []string{ - "📓", - }, - given: []string{ - "* ", - "😐", - }, - when: []string{ - "* ", - "🎬", - }, - then: []string{ - "* ", - "🙏", - }, - and: []string{ - "* ", - "😂", - }, - but: []string{ - "* ", - "😔", - }, - }, - }, - "en": &GherkinDialect{ - "en", "English", "English", map[string][]string{ - feature: []string{ - "Feature", - "Business Need", - "Ability", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Background", - }, - scenario: []string{ - "Example", - "Scenario", - }, - scenarioOutline: []string{ - "Scenario Outline", - "Scenario Template", - }, - examples: []string{ - "Examples", - "Scenarios", - }, - given: []string{ - "* ", - "Given ", - }, - when: []string{ - "* ", - "When ", - }, - then: []string{ - "* ", - "Then ", - }, - and: []string{ - "* ", - "And ", - }, - but: []string{ - "* ", - "But ", - }, - }, - }, - "en-Scouse": &GherkinDialect{ - "en-Scouse", "Scouse", "Scouse", map[string][]string{ - feature: []string{ - "Feature", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Dis is what went down", - }, - scenario: []string{ - "The thing of it is", - }, - scenarioOutline: []string{ - "Wharrimean is", - }, - examples: []string{ - "Examples", - }, - given: []string{ - "* ", - "Givun ", - "Youse know when youse got ", - }, - when: []string{ - "* ", - "Wun ", - "Youse know like when ", - }, - then: []string{ - "* ", - "Dun ", - "Den youse gotta ", - }, - and: []string{ - "* ", - "An ", - }, - but: []string{ - "* ", - "Buh ", - }, - }, - }, - "en-au": &GherkinDialect{ - "en-au", "Australian", "Australian", map[string][]string{ - feature: []string{ - "Pretty much", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "First off", - }, - scenario: []string{ - "Awww, look mate", - }, - scenarioOutline: []string{ - "Reckon it's like", - }, - examples: []string{ - "You'll wanna", - }, - given: []string{ - "* ", - "Y'know ", - }, - when: []string{ - "* ", - "It's just unbelievable ", - }, - then: []string{ - "* ", - "But at the end of the day I reckon ", - }, - and: []string{ - "* ", - "Too right ", - }, - but: []string{ - "* ", - "Yeah nah ", - }, - }, - }, - "en-lol": &GherkinDialect{ - "en-lol", "LOLCAT", "LOLCAT", map[string][]string{ - feature: []string{ - "OH HAI", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "B4", - }, - scenario: []string{ - "MISHUN", - }, - scenarioOutline: []string{ - "MISHUN SRSLY", - }, - examples: []string{ - "EXAMPLZ", - }, - given: []string{ - "* ", - "I CAN HAZ ", - }, - when: []string{ - "* ", - "WEN ", - }, - then: []string{ - "* ", - "DEN ", - }, - and: []string{ - "* ", - "AN ", - }, - but: []string{ - "* ", - "BUT ", - }, - }, - }, - "en-old": &GherkinDialect{ - "en-old", "Old English", "Englisc", map[string][]string{ - feature: []string{ - "Hwaet", - "Hwæt", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Aer", - "Ær", - }, - scenario: []string{ - "Swa", - }, - scenarioOutline: []string{ - "Swa hwaer swa", - "Swa hwær swa", - }, - examples: []string{ - "Se the", - "Se þe", - "Se ðe", - }, - given: []string{ - "* ", - "Thurh ", - "Þurh ", - "Ðurh ", - }, - when: []string{ - "* ", - "Tha ", - "Þa ", - "Ða ", - }, - then: []string{ - "* ", - "Tha ", - "Þa ", - "Ða ", - "Tha the ", - "Þa þe ", - "Ða ðe ", - }, - and: []string{ - "* ", - "Ond ", - "7 ", - }, - but: []string{ - "* ", - "Ac ", - }, - }, - }, - "en-pirate": &GherkinDialect{ - "en-pirate", "Pirate", "Pirate", map[string][]string{ - feature: []string{ - "Ahoy matey!", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Yo-ho-ho", - }, - scenario: []string{ - "Heave to", - }, - scenarioOutline: []string{ - "Shiver me timbers", - }, - examples: []string{ - "Dead men tell no tales", - }, - given: []string{ - "* ", - "Gangway! ", - }, - when: []string{ - "* ", - "Blimey! ", - }, - then: []string{ - "* ", - "Let go and haul ", - }, - and: []string{ - "* ", - "Aye ", - }, - but: []string{ - "* ", - "Avast! ", - }, - }, - }, - "eo": &GherkinDialect{ - "eo", "Esperanto", "Esperanto", map[string][]string{ - feature: []string{ - "Trajto", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Fono", - }, - scenario: []string{ - "Ekzemplo", - "Scenaro", - "Kazo", - }, - scenarioOutline: []string{ - "Konturo de la scenaro", - "Skizo", - "Kazo-skizo", - }, - examples: []string{ - "Ekzemploj", - }, - given: []string{ - "* ", - "Donitaĵo ", - "Komence ", - }, - when: []string{ - "* ", - "Se ", - }, - then: []string{ - "* ", - "Do ", - }, - and: []string{ - "* ", - "Kaj ", - }, - but: []string{ - "* ", - "Sed ", - }, - }, - }, - "es": &GherkinDialect{ - "es", "Spanish", "español", map[string][]string{ - feature: []string{ - "Característica", - "Necesidad del negocio", - "Requisito", - }, - rule: []string{ - "Regla", - "Regla de negocio", - }, - background: []string{ - "Antecedentes", - }, - scenario: []string{ - "Ejemplo", - "Escenario", - }, - scenarioOutline: []string{ - "Esquema del escenario", - }, - examples: []string{ - "Ejemplos", - }, - given: []string{ - "* ", - "Dado ", - "Dada ", - "Dados ", - "Dadas ", - }, - when: []string{ - "* ", - "Cuando ", - }, - then: []string{ - "* ", - "Entonces ", - }, - and: []string{ - "* ", - "Y ", - "E ", - }, - but: []string{ - "* ", - "Pero ", - }, - }, - }, - "et": &GherkinDialect{ - "et", "Estonian", "eesti keel", map[string][]string{ - feature: []string{ - "Omadus", - }, - rule: []string{ - "Reegel", - }, - background: []string{ - "Taust", - }, - scenario: []string{ - "Juhtum", - "Stsenaarium", - }, - scenarioOutline: []string{ - "Raamjuhtum", - "Raamstsenaarium", - }, - examples: []string{ - "Juhtumid", - }, - given: []string{ - "* ", - "Eeldades ", - }, - when: []string{ - "* ", - "Kui ", - }, - then: []string{ - "* ", - "Siis ", - }, - and: []string{ - "* ", - "Ja ", - }, - but: []string{ - "* ", - "Kuid ", - }, - }, - }, - "fa": &GherkinDialect{ - "fa", "Persian", "فارسی", map[string][]string{ - feature: []string{ - "وِیژگی", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "زمینه", - }, - scenario: []string{ - "مثال", - "سناریو", - }, - scenarioOutline: []string{ - "الگوی سناریو", - }, - examples: []string{ - "نمونه ها", - }, - given: []string{ - "* ", - "با فرض ", - }, - when: []string{ - "* ", - "هنگامی ", - }, - then: []string{ - "* ", - "آنگاه ", - }, - and: []string{ - "* ", - "و ", - }, - but: []string{ - "* ", - "اما ", - }, - }, - }, - "fi": &GherkinDialect{ - "fi", "Finnish", "suomi", map[string][]string{ - feature: []string{ - "Ominaisuus", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Tausta", - }, - scenario: []string{ - "Tapaus", - }, - scenarioOutline: []string{ - "Tapausaihio", - }, - examples: []string{ - "Tapaukset", - }, - given: []string{ - "* ", - "Oletetaan ", - }, - when: []string{ - "* ", - "Kun ", - }, - then: []string{ - "* ", - "Niin ", - }, - and: []string{ - "* ", - "Ja ", - }, - but: []string{ - "* ", - "Mutta ", - }, - }, - }, - "fr": &GherkinDialect{ - "fr", "French", "français", map[string][]string{ - feature: []string{ - "Fonctionnalité", - }, - rule: []string{ - "Règle", - }, - background: []string{ - "Contexte", - }, - scenario: []string{ - "Exemple", - "Scénario", - }, - scenarioOutline: []string{ - "Plan du scénario", - "Plan du Scénario", - }, - examples: []string{ - "Exemples", - }, - given: []string{ - "* ", - "Soit ", - "Sachant que ", - "Sachant qu'", - "Sachant ", - "Etant donné que ", - "Etant donné qu'", - "Etant donné ", - "Etant donnée ", - "Etant donnés ", - "Etant données ", - "Étant donné que ", - "Étant donné qu'", - "Étant donné ", - "Étant donnée ", - "Étant donnés ", - "Étant données ", - }, - when: []string{ - "* ", - "Quand ", - "Lorsque ", - "Lorsqu'", - }, - then: []string{ - "* ", - "Alors ", - "Donc ", - }, - and: []string{ - "* ", - "Et que ", - "Et qu'", - "Et ", - }, - but: []string{ - "* ", - "Mais que ", - "Mais qu'", - "Mais ", - }, - }, - }, - "ga": &GherkinDialect{ - "ga", "Irish", "Gaeilge", map[string][]string{ - feature: []string{ - "Gné", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Cúlra", - }, - scenario: []string{ - "Sampla", - "Cás", - }, - scenarioOutline: []string{ - "Cás Achomair", - }, - examples: []string{ - "Samplaí", - }, - given: []string{ - "* ", - "Cuir i gcás go", - "Cuir i gcás nach", - "Cuir i gcás gur", - "Cuir i gcás nár", - }, - when: []string{ - "* ", - "Nuair a", - "Nuair nach", - "Nuair ba", - "Nuair nár", - }, - then: []string{ - "* ", - "Ansin", - }, - and: []string{ - "* ", - "Agus", - }, - but: []string{ - "* ", - "Ach", - }, - }, - }, - "gj": &GherkinDialect{ - "gj", "Gujarati", "ગુજરાતી", map[string][]string{ - feature: []string{ - "લક્ષણ", - "વ્યાપાર જરૂર", - "ક્ષમતા", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "બેકગ્રાઉન્ડ", - }, - scenario: []string{ - "ઉદાહરણ", - "સ્થિતિ", - }, - scenarioOutline: []string{ - "પરિદ્દશ્ય રૂપરેખા", - "પરિદ્દશ્ય ઢાંચો", - }, - examples: []string{ - "ઉદાહરણો", - }, - given: []string{ - "* ", - "આપેલ છે ", - }, - when: []string{ - "* ", - "ક્યારે ", - }, - then: []string{ - "* ", - "પછી ", - }, - and: []string{ - "* ", - "અને ", - }, - but: []string{ - "* ", - "પણ ", - }, - }, - }, - "gl": &GherkinDialect{ - "gl", "Galician", "galego", map[string][]string{ - feature: []string{ - "Característica", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Contexto", - }, - scenario: []string{ - "Exemplo", - "Escenario", - }, - scenarioOutline: []string{ - "Esbozo do escenario", - }, - examples: []string{ - "Exemplos", - }, - given: []string{ - "* ", - "Dado ", - "Dada ", - "Dados ", - "Dadas ", - }, - when: []string{ - "* ", - "Cando ", - }, - then: []string{ - "* ", - "Entón ", - "Logo ", - }, - and: []string{ - "* ", - "E ", - }, - but: []string{ - "* ", - "Mais ", - "Pero ", - }, - }, - }, - "he": &GherkinDialect{ - "he", "Hebrew", "עברית", map[string][]string{ - feature: []string{ - "תכונה", - }, - rule: []string{ - "כלל", - }, - background: []string{ - "רקע", - }, - scenario: []string{ - "דוגמא", - "תרחיש", - }, - scenarioOutline: []string{ - "תבנית תרחיש", - }, - examples: []string{ - "דוגמאות", - }, - given: []string{ - "* ", - "בהינתן ", - }, - when: []string{ - "* ", - "כאשר ", - }, - then: []string{ - "* ", - "אז ", - "אזי ", - }, - and: []string{ - "* ", - "וגם ", - }, - but: []string{ - "* ", - "אבל ", - }, - }, - }, - "hi": &GherkinDialect{ - "hi", "Hindi", "हिंदी", map[string][]string{ - feature: []string{ - "रूप लेख", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "पृष्ठभूमि", - }, - scenario: []string{ - "परिदृश्य", - }, - scenarioOutline: []string{ - "परिदृश्य रूपरेखा", - }, - examples: []string{ - "उदाहरण", - }, - given: []string{ - "* ", - "अगर ", - "यदि ", - "चूंकि ", - }, - when: []string{ - "* ", - "जब ", - "कदा ", - }, - then: []string{ - "* ", - "तब ", - "तदा ", - }, - and: []string{ - "* ", - "और ", - "तथा ", - }, - but: []string{ - "* ", - "पर ", - "परन्तु ", - "किन्तु ", - }, - }, - }, - "hr": &GherkinDialect{ - "hr", "Croatian", "hrvatski", map[string][]string{ - feature: []string{ - "Osobina", - "Mogućnost", - "Mogucnost", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Pozadina", - }, - scenario: []string{ - "Primjer", - "Scenarij", - }, - scenarioOutline: []string{ - "Skica", - "Koncept", - }, - examples: []string{ - "Primjeri", - "Scenariji", - }, - given: []string{ - "* ", - "Zadan ", - "Zadani ", - "Zadano ", - "Ukoliko ", - }, - when: []string{ - "* ", - "Kada ", - "Kad ", - }, - then: []string{ - "* ", - "Onda ", - }, - and: []string{ - "* ", - "I ", - }, - but: []string{ - "* ", - "Ali ", - }, - }, - }, - "ht": &GherkinDialect{ - "ht", "Creole", "kreyòl", map[string][]string{ - feature: []string{ - "Karakteristik", - "Mak", - "Fonksyonalite", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Kontèks", - "Istorik", - }, - scenario: []string{ - "Senaryo", - }, - scenarioOutline: []string{ - "Plan senaryo", - "Plan Senaryo", - "Senaryo deskripsyon", - "Senaryo Deskripsyon", - "Dyagram senaryo", - "Dyagram Senaryo", - }, - examples: []string{ - "Egzanp", - }, - given: []string{ - "* ", - "Sipoze ", - "Sipoze ke ", - "Sipoze Ke ", - }, - when: []string{ - "* ", - "Lè ", - "Le ", - }, - then: []string{ - "* ", - "Lè sa a ", - "Le sa a ", - }, - and: []string{ - "* ", - "Ak ", - "Epi ", - "E ", - }, - but: []string{ - "* ", - "Men ", - }, - }, - }, - "hu": &GherkinDialect{ - "hu", "Hungarian", "magyar", map[string][]string{ - feature: []string{ - "Jellemző", - }, - rule: []string{ - "Szabály", - }, - background: []string{ - "Háttér", - }, - scenario: []string{ - "Példa", - "Forgatókönyv", - }, - scenarioOutline: []string{ - "Forgatókönyv vázlat", - }, - examples: []string{ - "Példák", - }, - given: []string{ - "* ", - "Amennyiben ", - "Adott ", - }, - when: []string{ - "* ", - "Majd ", - "Ha ", - "Amikor ", - }, - then: []string{ - "* ", - "Akkor ", - }, - and: []string{ - "* ", - "És ", - }, - but: []string{ - "* ", - "De ", - }, - }, - }, - "id": &GherkinDialect{ - "id", "Indonesian", "Bahasa Indonesia", map[string][]string{ - feature: []string{ - "Fitur", - }, - rule: []string{ - "Rule", - "Aturan", - }, - background: []string{ - "Dasar", - "Latar Belakang", - }, - scenario: []string{ - "Skenario", - }, - scenarioOutline: []string{ - "Skenario konsep", - "Garis-Besar Skenario", - }, - examples: []string{ - "Contoh", - "Misal", - }, - given: []string{ - "* ", - "Dengan ", - "Diketahui ", - "Diasumsikan ", - "Bila ", - "Jika ", - }, - when: []string{ - "* ", - "Ketika ", - }, - then: []string{ - "* ", - "Maka ", - "Kemudian ", - }, - and: []string{ - "* ", - "Dan ", - }, - but: []string{ - "* ", - "Tapi ", - "Tetapi ", - }, - }, - }, - "is": &GherkinDialect{ - "is", "Icelandic", "Íslenska", map[string][]string{ - feature: []string{ - "Eiginleiki", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Bakgrunnur", - }, - scenario: []string{ - "Atburðarás", - }, - scenarioOutline: []string{ - "Lýsing Atburðarásar", - "Lýsing Dæma", - }, - examples: []string{ - "Dæmi", - "Atburðarásir", - }, - given: []string{ - "* ", - "Ef ", - }, - when: []string{ - "* ", - "Þegar ", - }, - then: []string{ - "* ", - "Þá ", - }, - and: []string{ - "* ", - "Og ", - }, - but: []string{ - "* ", - "En ", - }, - }, - }, - "it": &GherkinDialect{ - "it", "Italian", "italiano", map[string][]string{ - feature: []string{ - "Funzionalità", - "Esigenza di Business", - "Abilità", - }, - rule: []string{ - "Regola", - }, - background: []string{ - "Contesto", - }, - scenario: []string{ - "Esempio", - "Scenario", - }, - scenarioOutline: []string{ - "Schema dello scenario", - }, - examples: []string{ - "Esempi", - }, - given: []string{ - "* ", - "Dato ", - "Data ", - "Dati ", - "Date ", - }, - when: []string{ - "* ", - "Quando ", - }, - then: []string{ - "* ", - "Allora ", - }, - and: []string{ - "* ", - "E ", - }, - but: []string{ - "* ", - "Ma ", - }, - }, - }, - "ja": &GherkinDialect{ - "ja", "Japanese", "日本語", map[string][]string{ - feature: []string{ - "フィーチャ", - "機能", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "背景", - }, - scenario: []string{ - "シナリオ", - }, - scenarioOutline: []string{ - "シナリオアウトライン", - "シナリオテンプレート", - "テンプレ", - "シナリオテンプレ", - }, - examples: []string{ - "例", - "サンプル", - }, - given: []string{ - "* ", - "前提", - }, - when: []string{ - "* ", - "もし", - }, - then: []string{ - "* ", - "ならば", - }, - and: []string{ - "* ", - "かつ", - }, - but: []string{ - "* ", - "しかし", - "但し", - "ただし", - }, - }, - }, - "jv": &GherkinDialect{ - "jv", "Javanese", "Basa Jawa", map[string][]string{ - feature: []string{ - "Fitur", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Dasar", - }, - scenario: []string{ - "Skenario", - }, - scenarioOutline: []string{ - "Konsep skenario", - }, - examples: []string{ - "Conto", - "Contone", - }, - given: []string{ - "* ", - "Nalika ", - "Nalikaning ", - }, - when: []string{ - "* ", - "Manawa ", - "Menawa ", - }, - then: []string{ - "* ", - "Njuk ", - "Banjur ", - }, - and: []string{ - "* ", - "Lan ", - }, - but: []string{ - "* ", - "Tapi ", - "Nanging ", - "Ananging ", - }, - }, - }, - "ka": &GherkinDialect{ - "ka", "Georgian", "ქართველი", map[string][]string{ - feature: []string{ - "თვისება", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "კონტექსტი", - }, - scenario: []string{ - "მაგალითად", - "სცენარის", - }, - scenarioOutline: []string{ - "სცენარის ნიმუში", - }, - examples: []string{ - "მაგალითები", - }, - given: []string{ - "* ", - "მოცემული", - }, - when: []string{ - "* ", - "როდესაც", - }, - then: []string{ - "* ", - "მაშინ", - }, - and: []string{ - "* ", - "და", - }, - but: []string{ - "* ", - "მაგ­რამ", - }, - }, - }, - "kn": &GherkinDialect{ - "kn", "Kannada", "ಕನ್ನಡ", map[string][]string{ - feature: []string{ - "ಹೆಚ್ಚಳ", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "ಹಿನ್ನೆಲೆ", - }, - scenario: []string{ - "ಉದಾಹರಣೆ", - "ಕಥಾಸಾರಾಂಶ", - }, - scenarioOutline: []string{ - "ವಿವರಣೆ", - }, - examples: []string{ - "ಉದಾಹರಣೆಗಳು", - }, - given: []string{ - "* ", - "ನೀಡಿದ ", - }, - when: []string{ - "* ", - "ಸ್ಥಿತಿಯನ್ನು ", - }, - then: []string{ - "* ", - "ನಂತರ ", - }, - and: []string{ - "* ", - "ಮತ್ತು ", - }, - but: []string{ - "* ", - "ಆದರೆ ", - }, - }, - }, - "ko": &GherkinDialect{ - "ko", "Korean", "한국어", map[string][]string{ - feature: []string{ - "기능", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "배경", - }, - scenario: []string{ - "시나리오", - }, - scenarioOutline: []string{ - "시나리오 개요", - }, - examples: []string{ - "예", - }, - given: []string{ - "* ", - "조건", - "먼저", - }, - when: []string{ - "* ", - "만일", - "만약", - }, - then: []string{ - "* ", - "그러면", - }, - and: []string{ - "* ", - "그리고", - }, - but: []string{ - "* ", - "하지만", - "단", - }, - }, - }, - "lt": &GherkinDialect{ - "lt", "Lithuanian", "lietuvių kalba", map[string][]string{ - feature: []string{ - "Savybė", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Kontekstas", - }, - scenario: []string{ - "Pavyzdys", - "Scenarijus", - }, - scenarioOutline: []string{ - "Scenarijaus šablonas", - }, - examples: []string{ - "Pavyzdžiai", - "Scenarijai", - "Variantai", - }, - given: []string{ - "* ", - "Duota ", - }, - when: []string{ - "* ", - "Kai ", - }, - then: []string{ - "* ", - "Tada ", - }, - and: []string{ - "* ", - "Ir ", - }, - but: []string{ - "* ", - "Bet ", - }, - }, - }, - "lu": &GherkinDialect{ - "lu", "Luxemburgish", "Lëtzebuergesch", map[string][]string{ - feature: []string{ - "Funktionalitéit", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Hannergrond", - }, - scenario: []string{ - "Beispill", - "Szenario", - }, - scenarioOutline: []string{ - "Plang vum Szenario", - }, - examples: []string{ - "Beispiller", - }, - given: []string{ - "* ", - "ugeholl ", - }, - when: []string{ - "* ", - "wann ", - }, - then: []string{ - "* ", - "dann ", - }, - and: []string{ - "* ", - "an ", - "a ", - }, - but: []string{ - "* ", - "awer ", - "mä ", - }, - }, - }, - "lv": &GherkinDialect{ - "lv", "Latvian", "latviešu", map[string][]string{ - feature: []string{ - "Funkcionalitāte", - "Fīča", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Konteksts", - "Situācija", - }, - scenario: []string{ - "Piemērs", - "Scenārijs", - }, - scenarioOutline: []string{ - "Scenārijs pēc parauga", - }, - examples: []string{ - "Piemēri", - "Paraugs", - }, - given: []string{ - "* ", - "Kad ", - }, - when: []string{ - "* ", - "Ja ", - }, - then: []string{ - "* ", - "Tad ", - }, - and: []string{ - "* ", - "Un ", - }, - but: []string{ - "* ", - "Bet ", - }, - }, - }, - "mk-Cyrl": &GherkinDialect{ - "mk-Cyrl", "Macedonian", "Македонски", map[string][]string{ - feature: []string{ - "Функционалност", - "Бизнис потреба", - "Можност", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Контекст", - "Содржина", - }, - scenario: []string{ - "Пример", - "Сценарио", - "На пример", - }, - scenarioOutline: []string{ - "Преглед на сценарија", - "Скица", - "Концепт", - }, - examples: []string{ - "Примери", - "Сценарија", - }, - given: []string{ - "* ", - "Дадено ", - "Дадена ", - }, - when: []string{ - "* ", - "Кога ", - }, - then: []string{ - "* ", - "Тогаш ", - }, - and: []string{ - "* ", - "И ", - }, - but: []string{ - "* ", - "Но ", - }, - }, - }, - "mk-Latn": &GherkinDialect{ - "mk-Latn", "Macedonian (Latin)", "Makedonski (Latinica)", map[string][]string{ - feature: []string{ - "Funkcionalnost", - "Biznis potreba", - "Mozhnost", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Kontekst", - "Sodrzhina", - }, - scenario: []string{ - "Scenario", - "Na primer", - }, - scenarioOutline: []string{ - "Pregled na scenarija", - "Skica", - "Koncept", - }, - examples: []string{ - "Primeri", - "Scenaria", - }, - given: []string{ - "* ", - "Dadeno ", - "Dadena ", - }, - when: []string{ - "* ", - "Koga ", - }, - then: []string{ - "* ", - "Togash ", - }, - and: []string{ - "* ", - "I ", - }, - but: []string{ - "* ", - "No ", - }, - }, - }, - "mn": &GherkinDialect{ - "mn", "Mongolian", "монгол", map[string][]string{ - feature: []string{ - "Функц", - "Функционал", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Агуулга", - }, - scenario: []string{ - "Сценар", - }, - scenarioOutline: []string{ - "Сценарын төлөвлөгөө", - }, - examples: []string{ - "Тухайлбал", - }, - given: []string{ - "* ", - "Өгөгдсөн нь ", - "Анх ", - }, - when: []string{ - "* ", - "Хэрэв ", - }, - then: []string{ - "* ", - "Тэгэхэд ", - "Үүний дараа ", - }, - and: []string{ - "* ", - "Мөн ", - "Тэгээд ", - }, - but: []string{ - "* ", - "Гэхдээ ", - "Харин ", - }, - }, - }, - "ne": &GherkinDialect{ - "ne", "Nepali", "नेपाली", map[string][]string{ - feature: []string{ - "सुविधा", - "विशेषता", - }, - rule: []string{ - "नियम", - }, - background: []string{ - "पृष्ठभूमी", - }, - scenario: []string{ - "परिदृश्य", - }, - scenarioOutline: []string{ - "परिदृश्य रूपरेखा", - }, - examples: []string{ - "उदाहरण", - "उदाहरणहरु", - }, - given: []string{ - "* ", - "दिइएको ", - "दिएको ", - "यदि ", - }, - when: []string{ - "* ", - "जब ", - }, - then: []string{ - "* ", - "त्यसपछि ", - "अनी ", - }, - and: []string{ - "* ", - "र ", - "अनी ", - }, - but: []string{ - "* ", - "तर ", - }, - }, - }, - "nl": &GherkinDialect{ - "nl", "Dutch", "Nederlands", map[string][]string{ - feature: []string{ - "Functionaliteit", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Achtergrond", - }, - scenario: []string{ - "Voorbeeld", - "Scenario", - }, - scenarioOutline: []string{ - "Abstract Scenario", - }, - examples: []string{ - "Voorbeelden", - }, - given: []string{ - "* ", - "Gegeven ", - "Stel ", - }, - when: []string{ - "* ", - "Als ", - "Wanneer ", - }, - then: []string{ - "* ", - "Dan ", - }, - and: []string{ - "* ", - "En ", - }, - but: []string{ - "* ", - "Maar ", - }, - }, - }, - "no": &GherkinDialect{ - "no", "Norwegian", "norsk", map[string][]string{ - feature: []string{ - "Egenskap", - }, - rule: []string{ - "Regel", - }, - background: []string{ - "Bakgrunn", - }, - scenario: []string{ - "Eksempel", - "Scenario", - }, - scenarioOutline: []string{ - "Scenariomal", - "Abstrakt Scenario", - }, - examples: []string{ - "Eksempler", - }, - given: []string{ - "* ", - "Gitt ", - }, - when: []string{ - "* ", - "Når ", - }, - then: []string{ - "* ", - "Så ", - }, - and: []string{ - "* ", - "Og ", - }, - but: []string{ - "* ", - "Men ", - }, - }, - }, - "pa": &GherkinDialect{ - "pa", "Panjabi", "ਪੰਜਾਬੀ", map[string][]string{ - feature: []string{ - "ਖਾਸੀਅਤ", - "ਮੁਹਾਂਦਰਾ", - "ਨਕਸ਼ ਨੁਹਾਰ", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "ਪਿਛੋਕੜ", - }, - scenario: []string{ - "ਉਦਾਹਰਨ", - "ਪਟਕਥਾ", - }, - scenarioOutline: []string{ - "ਪਟਕਥਾ ਢਾਂਚਾ", - "ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ", - }, - examples: []string{ - "ਉਦਾਹਰਨਾਂ", - }, - given: []string{ - "* ", - "ਜੇਕਰ ", - "ਜਿਵੇਂ ਕਿ ", - }, - when: []string{ - "* ", - "ਜਦੋਂ ", - }, - then: []string{ - "* ", - "ਤਦ ", - }, - and: []string{ - "* ", - "ਅਤੇ ", - }, - but: []string{ - "* ", - "ਪਰ ", - }, - }, - }, - "pl": &GherkinDialect{ - "pl", "Polish", "polski", map[string][]string{ - feature: []string{ - "Właściwość", - "Funkcja", - "Aspekt", - "Potrzeba biznesowa", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Założenia", - }, - scenario: []string{ - "Przykład", - "Scenariusz", - }, - scenarioOutline: []string{ - "Szablon scenariusza", - }, - examples: []string{ - "Przykłady", - }, - given: []string{ - "* ", - "Zakładając ", - "Mając ", - "Zakładając, że ", - }, - when: []string{ - "* ", - "Jeżeli ", - "Jeśli ", - "Gdy ", - "Kiedy ", - }, - then: []string{ - "* ", - "Wtedy ", - }, - and: []string{ - "* ", - "Oraz ", - "I ", - }, - but: []string{ - "* ", - "Ale ", - }, - }, - }, - "pt": &GherkinDialect{ - "pt", "Portuguese", "português", map[string][]string{ - feature: []string{ - "Funcionalidade", - "Característica", - "Caracteristica", - }, - rule: []string{ - "Regra", - }, - background: []string{ - "Contexto", - "Cenário de Fundo", - "Cenario de Fundo", - "Fundo", - }, - scenario: []string{ - "Exemplo", - "Cenário", - "Cenario", - }, - scenarioOutline: []string{ - "Esquema do Cenário", - "Esquema do Cenario", - "Delineação do Cenário", - "Delineacao do Cenario", - }, - examples: []string{ - "Exemplos", - "Cenários", - "Cenarios", - }, - given: []string{ - "* ", - "Dado ", - "Dada ", - "Dados ", - "Dadas ", - }, - when: []string{ - "* ", - "Quando ", - }, - then: []string{ - "* ", - "Então ", - "Entao ", - }, - and: []string{ - "* ", - "E ", - }, - but: []string{ - "* ", - "Mas ", - }, - }, - }, - "ro": &GherkinDialect{ - "ro", "Romanian", "română", map[string][]string{ - feature: []string{ - "Functionalitate", - "Funcționalitate", - "Funcţionalitate", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Context", - }, - scenario: []string{ - "Exemplu", - "Scenariu", - }, - scenarioOutline: []string{ - "Structura scenariu", - "Structură scenariu", - }, - examples: []string{ - "Exemple", - }, - given: []string{ - "* ", - "Date fiind ", - "Dat fiind ", - "Dată fiind", - "Dati fiind ", - "Dați fiind ", - "Daţi fiind ", - }, - when: []string{ - "* ", - "Cand ", - "Când ", - }, - then: []string{ - "* ", - "Atunci ", - }, - and: []string{ - "* ", - "Si ", - "Și ", - "Şi ", - }, - but: []string{ - "* ", - "Dar ", - }, - }, - }, - "ru": &GherkinDialect{ - "ru", "Russian", "русский", map[string][]string{ - feature: []string{ - "Функция", - "Функциональность", - "Функционал", - "Свойство", - }, - rule: []string{ - "Правило", - }, - background: []string{ - "Предыстория", - "Контекст", - }, - scenario: []string{ - "Пример", - "Сценарий", - }, - scenarioOutline: []string{ - "Структура сценария", - "Шаблон сценария", - }, - examples: []string{ - "Примеры", - }, - given: []string{ - "* ", - "Допустим ", - "Дано ", - "Пусть ", - }, - when: []string{ - "* ", - "Когда ", - "Если ", - }, - then: []string{ - "* ", - "То ", - "Затем ", - "Тогда ", - }, - and: []string{ - "* ", - "И ", - "К тому же ", - "Также ", - }, - but: []string{ - "* ", - "Но ", - "А ", - "Иначе ", - }, - }, - }, - "sk": &GherkinDialect{ - "sk", "Slovak", "Slovensky", map[string][]string{ - feature: []string{ - "Požiadavka", - "Funkcia", - "Vlastnosť", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Pozadie", - }, - scenario: []string{ - "Príklad", - "Scenár", - }, - scenarioOutline: []string{ - "Náčrt Scenáru", - "Náčrt Scenára", - "Osnova Scenára", - }, - examples: []string{ - "Príklady", - }, - given: []string{ - "* ", - "Pokiaľ ", - "Za predpokladu ", - }, - when: []string{ - "* ", - "Keď ", - "Ak ", - }, - then: []string{ - "* ", - "Tak ", - "Potom ", - }, - and: []string{ - "* ", - "A ", - "A tiež ", - "A taktiež ", - "A zároveň ", - }, - but: []string{ - "* ", - "Ale ", - }, - }, - }, - "sl": &GherkinDialect{ - "sl", "Slovenian", "Slovenski", map[string][]string{ - feature: []string{ - "Funkcionalnost", - "Funkcija", - "Možnosti", - "Moznosti", - "Lastnost", - "Značilnost", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Kontekst", - "Osnova", - "Ozadje", - }, - scenario: []string{ - "Primer", - "Scenarij", - }, - scenarioOutline: []string{ - "Struktura scenarija", - "Skica", - "Koncept", - "Oris scenarija", - "Osnutek", - }, - examples: []string{ - "Primeri", - "Scenariji", - }, - given: []string{ - "Dano ", - "Podano ", - "Zaradi ", - "Privzeto ", - }, - when: []string{ - "Ko ", - "Ce ", - "Če ", - "Kadar ", - }, - then: []string{ - "Nato ", - "Potem ", - "Takrat ", - }, - and: []string{ - "In ", - "Ter ", - }, - but: []string{ - "Toda ", - "Ampak ", - "Vendar ", - }, - }, - }, - "sr-Cyrl": &GherkinDialect{ - "sr-Cyrl", "Serbian", "Српски", map[string][]string{ - feature: []string{ - "Функционалност", - "Могућност", - "Особина", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Контекст", - "Основа", - "Позадина", - }, - scenario: []string{ - "Пример", - "Сценарио", - "Пример", - }, - scenarioOutline: []string{ - "Структура сценарија", - "Скица", - "Концепт", - }, - examples: []string{ - "Примери", - "Сценарији", - }, - given: []string{ - "* ", - "За дато ", - "За дате ", - "За дати ", - }, - when: []string{ - "* ", - "Када ", - "Кад ", - }, - then: []string{ - "* ", - "Онда ", - }, - and: []string{ - "* ", - "И ", - }, - but: []string{ - "* ", - "Али ", - }, - }, - }, - "sr-Latn": &GherkinDialect{ - "sr-Latn", "Serbian (Latin)", "Srpski (Latinica)", map[string][]string{ - feature: []string{ - "Funkcionalnost", - "Mogućnost", - "Mogucnost", - "Osobina", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Kontekst", - "Osnova", - "Pozadina", - }, - scenario: []string{ - "Scenario", - "Primer", - }, - scenarioOutline: []string{ - "Struktura scenarija", - "Skica", - "Koncept", - }, - examples: []string{ - "Primeri", - "Scenariji", - }, - given: []string{ - "* ", - "Za dato ", - "Za date ", - "Za dati ", - }, - when: []string{ - "* ", - "Kada ", - "Kad ", - }, - then: []string{ - "* ", - "Onda ", - }, - and: []string{ - "* ", - "I ", - }, - but: []string{ - "* ", - "Ali ", - }, - }, - }, - "sv": &GherkinDialect{ - "sv", "Swedish", "Svenska", map[string][]string{ - feature: []string{ - "Egenskap", - }, - rule: []string{ - "Regel", - }, - background: []string{ - "Bakgrund", - }, - scenario: []string{ - "Scenario", - }, - scenarioOutline: []string{ - "Abstrakt Scenario", - "Scenariomall", - }, - examples: []string{ - "Exempel", - }, - given: []string{ - "* ", - "Givet ", - }, - when: []string{ - "* ", - "När ", - }, - then: []string{ - "* ", - "Så ", - }, - and: []string{ - "* ", - "Och ", - }, - but: []string{ - "* ", - "Men ", - }, - }, - }, - "ta": &GherkinDialect{ - "ta", "Tamil", "தமிழ்", map[string][]string{ - feature: []string{ - "அம்சம்", - "வணிக தேவை", - "திறன்", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "பின்னணி", - }, - scenario: []string{ - "உதாரணமாக", - "காட்சி", - }, - scenarioOutline: []string{ - "காட்சி சுருக்கம்", - "காட்சி வார்ப்புரு", - }, - examples: []string{ - "எடுத்துக்காட்டுகள்", - "காட்சிகள்", - "நிலைமைகளில்", - }, - given: []string{ - "* ", - "கொடுக்கப்பட்ட ", - }, - when: []string{ - "* ", - "எப்போது ", - }, - then: []string{ - "* ", - "அப்பொழுது ", - }, - and: []string{ - "* ", - "மேலும் ", - "மற்றும் ", - }, - but: []string{ - "* ", - "ஆனால் ", - }, - }, - }, - "th": &GherkinDialect{ - "th", "Thai", "ไทย", map[string][]string{ - feature: []string{ - "โครงหลัก", - "ความต้องการทางธุรกิจ", - "ความสามารถ", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "แนวคิด", - }, - scenario: []string{ - "เหตุการณ์", - }, - scenarioOutline: []string{ - "สรุปเหตุการณ์", - "โครงสร้างของเหตุการณ์", - }, - examples: []string{ - "ชุดของตัวอย่าง", - "ชุดของเหตุการณ์", - }, - given: []string{ - "* ", - "กำหนดให้ ", - }, - when: []string{ - "* ", - "เมื่อ ", - }, - then: []string{ - "* ", - "ดังนั้น ", - }, - and: []string{ - "* ", - "และ ", - }, - but: []string{ - "* ", - "แต่ ", - }, - }, - }, - "te": &GherkinDialect{ - "te", "Telugu", "తెలుగు", map[string][]string{ - feature: []string{ - "గుణము", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "నేపథ్యం", - }, - scenario: []string{ - "ఉదాహరణ", - "సన్నివేశం", - }, - scenarioOutline: []string{ - "కథనం", - }, - examples: []string{ - "ఉదాహరణలు", - }, - given: []string{ - "* ", - "చెప్పబడినది ", - }, - when: []string{ - "* ", - "ఈ పరిస్థితిలో ", - }, - then: []string{ - "* ", - "అప్పుడు ", - }, - and: []string{ - "* ", - "మరియు ", - }, - but: []string{ - "* ", - "కాని ", - }, - }, - }, - "tlh": &GherkinDialect{ - "tlh", "Klingon", "tlhIngan", map[string][]string{ - feature: []string{ - "Qap", - "Qu'meH 'ut", - "perbogh", - "poQbogh malja'", - "laH", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "mo'", - }, - scenario: []string{ - "lut", - }, - scenarioOutline: []string{ - "lut chovnatlh", - }, - examples: []string{ - "ghantoH", - "lutmey", - }, - given: []string{ - "* ", - "ghu' noblu' ", - "DaH ghu' bejlu' ", - }, - when: []string{ - "* ", - "qaSDI' ", - }, - then: []string{ - "* ", - "vaj ", - }, - and: []string{ - "* ", - "'ej ", - "latlh ", - }, - but: []string{ - "* ", - "'ach ", - "'a ", - }, - }, - }, - "tr": &GherkinDialect{ - "tr", "Turkish", "Türkçe", map[string][]string{ - feature: []string{ - "Özellik", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Geçmiş", - }, - scenario: []string{ - "Örnek", - "Senaryo", - }, - scenarioOutline: []string{ - "Senaryo taslağı", - }, - examples: []string{ - "Örnekler", - }, - given: []string{ - "* ", - "Diyelim ki ", - }, - when: []string{ - "* ", - "Eğer ki ", - }, - then: []string{ - "* ", - "O zaman ", - }, - and: []string{ - "* ", - "Ve ", - }, - but: []string{ - "* ", - "Fakat ", - "Ama ", - }, - }, - }, - "tt": &GherkinDialect{ - "tt", "Tatar", "Татарча", map[string][]string{ - feature: []string{ - "Мөмкинлек", - "Үзенчәлеклелек", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Кереш", - }, - scenario: []string{ - "Сценарий", - }, - scenarioOutline: []string{ - "Сценарийның төзелеше", - }, - examples: []string{ - "Үрнәкләр", - "Мисаллар", - }, - given: []string{ - "* ", - "Әйтик ", - }, - when: []string{ - "* ", - "Әгәр ", - }, - then: []string{ - "* ", - "Нәтиҗәдә ", - }, - and: []string{ - "* ", - "Һәм ", - "Вә ", - }, - but: []string{ - "* ", - "Ләкин ", - "Әмма ", - }, - }, - }, - "uk": &GherkinDialect{ - "uk", "Ukrainian", "Українська", map[string][]string{ - feature: []string{ - "Функціонал", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Передумова", - }, - scenario: []string{ - "Приклад", - "Сценарій", - }, - scenarioOutline: []string{ - "Структура сценарію", - }, - examples: []string{ - "Приклади", - }, - given: []string{ - "* ", - "Припустимо ", - "Припустимо, що ", - "Нехай ", - "Дано ", - }, - when: []string{ - "* ", - "Якщо ", - "Коли ", - }, - then: []string{ - "* ", - "То ", - "Тоді ", - }, - and: []string{ - "* ", - "І ", - "А також ", - "Та ", - }, - but: []string{ - "* ", - "Але ", - }, - }, - }, - "ur": &GherkinDialect{ - "ur", "Urdu", "اردو", map[string][]string{ - feature: []string{ - "صلاحیت", - "کاروبار کی ضرورت", - "خصوصیت", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "پس منظر", - }, - scenario: []string{ - "منظرنامہ", - }, - scenarioOutline: []string{ - "منظر نامے کا خاکہ", - }, - examples: []string{ - "مثالیں", - }, - given: []string{ - "* ", - "اگر ", - "بالفرض ", - "فرض کیا ", - }, - when: []string{ - "* ", - "جب ", - }, - then: []string{ - "* ", - "پھر ", - "تب ", - }, - and: []string{ - "* ", - "اور ", - }, - but: []string{ - "* ", - "لیکن ", - }, - }, - }, - "uz": &GherkinDialect{ - "uz", "Uzbek", "Узбекча", map[string][]string{ - feature: []string{ - "Функционал", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Тарих", - }, - scenario: []string{ - "Сценарий", - }, - scenarioOutline: []string{ - "Сценарий структураси", - }, - examples: []string{ - "Мисоллар", - }, - given: []string{ - "* ", - "Агар ", - }, - when: []string{ - "* ", - "Агар ", - }, - then: []string{ - "* ", - "Унда ", - }, - and: []string{ - "* ", - "Ва ", - }, - but: []string{ - "* ", - "Лекин ", - "Бирок ", - "Аммо ", - }, - }, - }, - "vi": &GherkinDialect{ - "vi", "Vietnamese", "Tiếng Việt", map[string][]string{ - feature: []string{ - "Tính năng", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "Bối cảnh", - }, - scenario: []string{ - "Tình huống", - "Kịch bản", - }, - scenarioOutline: []string{ - "Khung tình huống", - "Khung kịch bản", - }, - examples: []string{ - "Dữ liệu", - }, - given: []string{ - "* ", - "Biết ", - "Cho ", - }, - when: []string{ - "* ", - "Khi ", - }, - then: []string{ - "* ", - "Thì ", - }, - and: []string{ - "* ", - "Và ", - }, - but: []string{ - "* ", - "Nhưng ", - }, - }, - }, - "zh-CN": &GherkinDialect{ - "zh-CN", "Chinese simplified", "简体中文", map[string][]string{ - feature: []string{ - "功能", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "背景", - }, - scenario: []string{ - "场景", - "剧本", - }, - scenarioOutline: []string{ - "场景大纲", - "剧本大纲", - }, - examples: []string{ - "例子", - }, - given: []string{ - "* ", - "假如", - "假设", - "假定", - }, - when: []string{ - "* ", - "当", - }, - then: []string{ - "* ", - "那么", - }, - and: []string{ - "* ", - "而且", - "并且", - "同时", - }, - but: []string{ - "* ", - "但是", - }, - }, - }, - "zh-TW": &GherkinDialect{ - "zh-TW", "Chinese traditional", "繁體中文", map[string][]string{ - feature: []string{ - "功能", - }, - rule: []string{ - "Rule", - }, - background: []string{ - "背景", - }, - scenario: []string{ - "場景", - "劇本", - }, - scenarioOutline: []string{ - "場景大綱", - "劇本大綱", - }, - examples: []string{ - "例子", - }, - given: []string{ - "* ", - "假如", - "假設", - "假定", - }, - when: []string{ - "* ", - "當", - }, - then: []string{ - "* ", - "那麼", - }, - and: []string{ - "* ", - "而且", - "並且", - "同時", - }, - but: []string{ - "* ", - "但是", - }, - }, - }, - "mr": &GherkinDialect{ - "mr", "Marathi", "मराठी", map[string][]string{ - feature: []string{ - "वैशिष्ट्य", - "सुविधा", - }, - rule: []string{ - "नियम", - }, - background: []string{ - "पार्श्वभूमी", - }, - scenario: []string{ - "परिदृश्य", - }, - scenarioOutline: []string{ - "परिदृश्य रूपरेखा", - }, - examples: []string{ - "उदाहरण", - }, - given: []string{ - "* ", - "जर", - "दिलेल्या प्रमाणे ", - }, - when: []string{ - "* ", - "जेव्हा ", - }, - then: []string{ - "* ", - "मग ", - "तेव्हा ", - }, - and: []string{ - "* ", - "आणि ", - "तसेच ", - }, - but: []string{ - "* ", - "पण ", - "परंतु ", - }, - }, - }, -} diff --git a/vendor/github.com/cucumber/gherkin-go/v19/dialects_builtin.go.jq b/vendor/github.com/cucumber/gherkin-go/v19/dialects_builtin.go.jq deleted file mode 100644 index 6ac0eaa..0000000 --- a/vendor/github.com/cucumber/gherkin-go/v19/dialects_builtin.go.jq +++ /dev/null @@ -1,33 +0,0 @@ -. as $root -| ( - [ to_entries[] - | [ - "\t",(.key|@json),": &GherkinDialect{\n", - "\t\t", (.key|@json),", ", (.value.name|@json),", ", (.value.native|@json), ", map[string][]string{\n" - ] + ( - [ .value - | {"feature","rule","background","scenario","scenarioOutline","examples","given","when","then","and","but"} - | to_entries[] - | "\t\t\t"+(.key), ": []string{\n", - ([ .value[] | "\t\t\t\t", @json, ",\n" ]|add), - "\t\t\t},\n" - ] - ) + ["\t\t},\n","\t},\n"] - | add - ] - | add - ) -| "package gherkin\n\n" -+ "// Builtin dialects for " + ([ $root | to_entries[] | .key+" ("+.value.name+")" ] | join(", ")) + "\n" -+ "func GherkinDialectsBuildin() GherkinDialectProvider {\n" -+ "\treturn buildinDialects\n" -+ "}\n\n" -+ "const (\n" -+ ( - ["feature","rule","background","scenario","scenarioOutline","examples","given","when","then","and","but"] - | [ .[] | "\t" + . + " = " + (.|@json) + "\n" ] - | add ) -+ ")\n\n" -+ "var buildinDialects = gherkinDialectMap{\n" -+ . -+ "}\n" \ No newline at end of file diff --git a/vendor/github.com/cucumber/messages-go/v16/Makefile b/vendor/github.com/cucumber/messages-go/v16/Makefile deleted file mode 100644 index acc9fe8..0000000 --- a/vendor/github.com/cucumber/messages-go/v16/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -include default.mk - -JSONSCHEMAS = $(shell find ../jsonschema -name "*.json") - -.deps: messages.go - -messages.go: $(JSONSCHEMAS) ../jsonschema/scripts/codegen.rb - ruby ../jsonschema/scripts/codegen.rb Go ../jsonschema > $@ diff --git a/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE index c836416..bc52e96 100644 --- a/vendor/github.com/davecgh/go-spew/LICENSE +++ b/vendor/github.com/davecgh/go-spew/LICENSE @@ -2,7 +2,7 @@ ISC License Copyright (c) 2012-2016 Dave Collins -Permission to use, copy, modify, and distribute this software for any +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go index 8a4a658..7929947 100644 --- a/vendor/github.com/davecgh/go-spew/spew/bypass.go +++ b/vendor/github.com/davecgh/go-spew/spew/bypass.go @@ -16,7 +16,9 @@ // when the code is not running on Google App Engine, compiled by GopherJS, and // "-tags safe" is not added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. -// +build !js,!appengine,!safe,!disableunsafe +// Go versions prior to 1.4 are disabled because they use a different layout +// for interfaces which make the implementation of unsafeReflectValue more complex. +// +build !js,!appengine,!safe,!disableunsafe,go1.4 package spew @@ -34,80 +36,49 @@ const ( ptrSize = unsafe.Sizeof((*byte)(nil)) ) +type flag uintptr + var ( - // offsetPtr, offsetScalar, and offsetFlag are the offsets for the - // internal reflect.Value fields. These values are valid before golang - // commit ecccf07e7f9d which changed the format. The are also valid - // after commit 82f48826c6c7 which changed the format again to mirror - // the original format. Code in the init function updates these offsets - // as necessary. - offsetPtr = uintptr(ptrSize) - offsetScalar = uintptr(0) - offsetFlag = uintptr(ptrSize * 2) - - // flagKindWidth and flagKindShift indicate various bits that the - // reflect package uses internally to track kind information. - // - // flagRO indicates whether or not the value field of a reflect.Value is - // read-only. - // - // flagIndir indicates whether the value field of a reflect.Value is - // the actual data or a pointer to the data. - // - // These values are valid before golang commit 90a7c3c86944 which - // changed their positions. Code in the init function updates these - // flags as necessary. - flagKindWidth = uintptr(5) - flagKindShift = uintptr(flagKindWidth - 1) - flagRO = uintptr(1 << 0) - flagIndir = uintptr(1 << 1) + // flagRO indicates whether the value field of a reflect.Value + // is read-only. + flagRO flag + + // flagAddr indicates whether the address of the reflect.Value's + // value may be taken. + flagAddr flag ) -func init() { - // Older versions of reflect.Value stored small integers directly in the - // ptr field (which is named val in the older versions). Versions - // between commits ecccf07e7f9d and 82f48826c6c7 added a new field named - // scalar for this purpose which unfortunately came before the flag - // field, so the offset of the flag field is different for those - // versions. - // - // This code constructs a new reflect.Value from a known small integer - // and checks if the size of the reflect.Value struct indicates it has - // the scalar field. When it does, the offsets are updated accordingly. - vv := reflect.ValueOf(0xf00) - if unsafe.Sizeof(vv) == (ptrSize * 4) { - offsetScalar = ptrSize * 2 - offsetFlag = ptrSize * 3 - } +// flagKindMask holds the bits that make up the kind +// part of the flags field. In all the supported versions, +// it is in the lower 5 bits. +const flagKindMask = flag(0x1f) - // Commit 90a7c3c86944 changed the flag positions such that the low - // order bits are the kind. This code extracts the kind from the flags - // field and ensures it's the correct type. When it's not, the flag - // order has been changed to the newer format, so the flags are updated - // accordingly. - upf := unsafe.Pointer(uintptr(unsafe.Pointer(&vv)) + offsetFlag) - upfv := *(*uintptr)(upf) - flagKindMask := uintptr((1<>flagKindShift != uintptr(reflect.Int) { - flagKindShift = 0 - flagRO = 1 << 5 - flagIndir = 1 << 6 - - // Commit adf9b30e5594 modified the flags to separate the - // flagRO flag into two bits which specifies whether or not the - // field is embedded. This causes flagIndir to move over a bit - // and means that flagRO is the combination of either of the - // original flagRO bit and the new bit. - // - // This code detects the change by extracting what used to be - // the indirect bit to ensure it's set. When it's not, the flag - // order has been changed to the newer format, so the flags are - // updated accordingly. - if upfv&flagIndir == 0 { - flagRO = 3 << 5 - flagIndir = 1 << 7 - } +// Different versions of Go have used different +// bit layouts for the flags type. This table +// records the known combinations. +var okFlags = []struct { + ro, addr flag +}{{ + // From Go 1.4 to 1.5 + ro: 1 << 5, + addr: 1 << 7, +}, { + // Up to Go tip. + ro: 1<<5 | 1<<6, + addr: 1 << 8, +}} + +var flagValOffset = func() uintptr { + field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag") + if !ok { + panic("reflect.Value has no flag field") } + return field.Offset +}() + +// flagField returns a pointer to the flag field of a reflect.Value. +func flagField(v *reflect.Value) *flag { + return (*flag)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + flagValOffset)) } // unsafeReflectValue converts the passed reflect.Value into a one that bypasses @@ -119,34 +90,56 @@ func init() { // This allows us to check for implementations of the Stringer and error // interfaces to be used for pretty printing ordinarily unaddressable and // inaccessible values such as unexported struct fields. -func unsafeReflectValue(v reflect.Value) (rv reflect.Value) { - indirects := 1 - vt := v.Type() - upv := unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetPtr) - rvf := *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetFlag)) - if rvf&flagIndir != 0 { - vt = reflect.PtrTo(v.Type()) - indirects++ - } else if offsetScalar != 0 { - // The value is in the scalar field when it's not one of the - // reference types. - switch vt.Kind() { - case reflect.Uintptr: - case reflect.Chan: - case reflect.Func: - case reflect.Map: - case reflect.Ptr: - case reflect.UnsafePointer: - default: - upv = unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + - offsetScalar) - } +func unsafeReflectValue(v reflect.Value) reflect.Value { + if !v.IsValid() || (v.CanInterface() && v.CanAddr()) { + return v } + flagFieldPtr := flagField(&v) + *flagFieldPtr &^= flagRO + *flagFieldPtr |= flagAddr + return v +} - pv := reflect.NewAt(vt, upv) - rv = pv - for i := 0; i < indirects; i++ { - rv = rv.Elem() +// Sanity checks against future reflect package changes +// to the type or semantics of the Value.flag field. +func init() { + field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag") + if !ok { + panic("reflect.Value has no flag field") + } + if field.Type.Kind() != reflect.TypeOf(flag(0)).Kind() { + panic("reflect.Value flag field has changed kind") + } + type t0 int + var t struct { + A t0 + // t0 will have flagEmbedRO set. + t0 + // a will have flagStickyRO set + a t0 + } + vA := reflect.ValueOf(t).FieldByName("A") + va := reflect.ValueOf(t).FieldByName("a") + vt0 := reflect.ValueOf(t).FieldByName("t0") + + // Infer flagRO from the difference between the flags + // for the (otherwise identical) fields in t. + flagPublic := *flagField(&vA) + flagWithRO := *flagField(&va) | *flagField(&vt0) + flagRO = flagPublic ^ flagWithRO + + // Infer flagAddr from the difference between a value + // taken from a pointer and not. + vPtrA := reflect.ValueOf(&t).Elem().FieldByName("A") + flagNoPtr := *flagField(&vA) + flagPtr := *flagField(&vPtrA) + flagAddr = flagNoPtr ^ flagPtr + + // Check that the inferred flags tally with one of the known versions. + for _, f := range okFlags { + if flagRO == f.ro && flagAddr == f.addr { + return + } } - return rv + panic("reflect.Value read-only flag has changed semantics") } diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go index 1fe3cf3..205c28d 100644 --- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go +++ b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go @@ -16,7 +16,7 @@ // when the code is running on Google App Engine, compiled by GopherJS, or // "-tags safe" is added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. -// +build js appengine safe disableunsafe +// +build js appengine safe disableunsafe !go1.4 package spew diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go index 7c519ff..1be8ce9 100644 --- a/vendor/github.com/davecgh/go-spew/spew/common.go +++ b/vendor/github.com/davecgh/go-spew/spew/common.go @@ -180,7 +180,7 @@ func printComplex(w io.Writer, c complex128, floatPrecision int) { w.Write(closeParenBytes) } -// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x' +// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x' // prefix to Writer w. func printHexPtr(w io.Writer, p uintptr) { // Null pointer. diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go index df1d582..f78d89f 100644 --- a/vendor/github.com/davecgh/go-spew/spew/dump.go +++ b/vendor/github.com/davecgh/go-spew/spew/dump.go @@ -35,16 +35,16 @@ var ( // cCharRE is a regular expression that matches a cgo char. // It is used to detect character arrays to hexdump them. - cCharRE = regexp.MustCompile("^.*\\._Ctype_char$") + cCharRE = regexp.MustCompile(`^.*\._Ctype_char$`) // cUnsignedCharRE is a regular expression that matches a cgo unsigned // char. It is used to detect unsigned character arrays to hexdump // them. - cUnsignedCharRE = regexp.MustCompile("^.*\\._Ctype_unsignedchar$") + cUnsignedCharRE = regexp.MustCompile(`^.*\._Ctype_unsignedchar$`) // cUint8tCharRE is a regular expression that matches a cgo uint8_t. // It is used to detect uint8_t arrays to hexdump them. - cUint8tCharRE = regexp.MustCompile("^.*\\._Ctype_uint8_t$") + cUint8tCharRE = regexp.MustCompile(`^.*\._Ctype_uint8_t$`) ) // dumpState contains information about the state of a dump operation. @@ -143,10 +143,10 @@ func (d *dumpState) dumpPtr(v reflect.Value) { // Display dereferenced value. d.w.Write(openParenBytes) switch { - case nilFound == true: + case nilFound: d.w.Write(nilAngleBytes) - case cycleFound == true: + case cycleFound: d.w.Write(circularBytes) default: diff --git a/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go index c49875b..b04edb7 100644 --- a/vendor/github.com/davecgh/go-spew/spew/format.go +++ b/vendor/github.com/davecgh/go-spew/spew/format.go @@ -182,10 +182,10 @@ func (f *formatState) formatPtr(v reflect.Value) { // Display dereferenced value. switch { - case nilFound == true: + case nilFound: f.fs.Write(nilAngleBytes) - case cycleFound == true: + case cycleFound: f.fs.Write(circularShortBytes) default: diff --git a/vendor/github.com/stretchr/testify/assert/assertion_compare.go b/vendor/github.com/stretchr/testify/assert/assertion_compare.go index 41649d2..95d8e59 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_compare.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_compare.go @@ -1,8 +1,10 @@ package assert import ( + "bytes" "fmt" "reflect" + "time" ) type CompareType int @@ -30,6 +32,9 @@ var ( float64Type = reflect.TypeOf(float64(1)) stringType = reflect.TypeOf("") + + timeType = reflect.TypeOf(time.Time{}) + bytesType = reflect.TypeOf([]byte{}) ) func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) { @@ -299,6 +304,47 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) { return compareLess, true } } + // Check for known struct types we can check for compare results. + case reflect.Struct: + { + // All structs enter here. We're not interested in most types. + if !canConvert(obj1Value, timeType) { + break + } + + // time.Time can compared! + timeObj1, ok := obj1.(time.Time) + if !ok { + timeObj1 = obj1Value.Convert(timeType).Interface().(time.Time) + } + + timeObj2, ok := obj2.(time.Time) + if !ok { + timeObj2 = obj2Value.Convert(timeType).Interface().(time.Time) + } + + return compare(timeObj1.UnixNano(), timeObj2.UnixNano(), reflect.Int64) + } + case reflect.Slice: + { + // We only care about the []byte type. + if !canConvert(obj1Value, bytesType) { + break + } + + // []byte can be compared! + bytesObj1, ok := obj1.([]byte) + if !ok { + bytesObj1 = obj1Value.Convert(bytesType).Interface().([]byte) + + } + bytesObj2, ok := obj2.([]byte) + if !ok { + bytesObj2 = obj2Value.Convert(bytesType).Interface().([]byte) + } + + return CompareType(bytes.Compare(bytesObj1, bytesObj2)), true + } } return compareEqual, false @@ -310,7 +356,10 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) { // assert.Greater(t, float64(2), float64(1)) // assert.Greater(t, "b", "a") func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - return compareTwoValues(t, e1, e2, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs) + if h, ok := t.(tHelper); ok { + h.Helper() + } + return compareTwoValues(t, e1, e2, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...) } // GreaterOrEqual asserts that the first element is greater than or equal to the second @@ -320,7 +369,10 @@ func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface // assert.GreaterOrEqual(t, "b", "a") // assert.GreaterOrEqual(t, "b", "b") func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - return compareTwoValues(t, e1, e2, []CompareType{compareGreater, compareEqual}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs) + if h, ok := t.(tHelper); ok { + h.Helper() + } + return compareTwoValues(t, e1, e2, []CompareType{compareGreater, compareEqual}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...) } // Less asserts that the first element is less than the second @@ -329,7 +381,10 @@ func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...in // assert.Less(t, float64(1), float64(2)) // assert.Less(t, "a", "b") func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - return compareTwoValues(t, e1, e2, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs) + if h, ok := t.(tHelper); ok { + h.Helper() + } + return compareTwoValues(t, e1, e2, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...) } // LessOrEqual asserts that the first element is less than or equal to the second @@ -339,7 +394,10 @@ func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) // assert.LessOrEqual(t, "a", "b") // assert.LessOrEqual(t, "b", "b") func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - return compareTwoValues(t, e1, e2, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs) + if h, ok := t.(tHelper); ok { + h.Helper() + } + return compareTwoValues(t, e1, e2, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...) } // Positive asserts that the specified element is positive @@ -347,8 +405,11 @@ func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...inter // assert.Positive(t, 1) // assert.Positive(t, 1.23) func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } zero := reflect.Zero(reflect.TypeOf(e)) - return compareTwoValues(t, e, zero.Interface(), []CompareType{compareGreater}, "\"%v\" is not positive", msgAndArgs) + return compareTwoValues(t, e, zero.Interface(), []CompareType{compareGreater}, "\"%v\" is not positive", msgAndArgs...) } // Negative asserts that the specified element is negative @@ -356,8 +417,11 @@ func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { // assert.Negative(t, -1) // assert.Negative(t, -1.23) func Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } zero := reflect.Zero(reflect.TypeOf(e)) - return compareTwoValues(t, e, zero.Interface(), []CompareType{compareLess}, "\"%v\" is not negative", msgAndArgs) + return compareTwoValues(t, e, zero.Interface(), []CompareType{compareLess}, "\"%v\" is not negative", msgAndArgs...) } func compareTwoValues(t TestingT, e1 interface{}, e2 interface{}, allowedComparesResults []CompareType, failMessage string, msgAndArgs ...interface{}) bool { diff --git a/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go b/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go new file mode 100644 index 0000000..da86790 --- /dev/null +++ b/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go @@ -0,0 +1,16 @@ +//go:build go1.17 +// +build go1.17 + +// TODO: once support for Go 1.16 is dropped, this file can be +// merged/removed with assertion_compare_go1.17_test.go and +// assertion_compare_legacy.go + +package assert + +import "reflect" + +// Wrapper around reflect.Value.CanConvert, for compatibility +// reasons. +func canConvert(value reflect.Value, to reflect.Type) bool { + return value.CanConvert(to) +} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go b/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go new file mode 100644 index 0000000..1701af2 --- /dev/null +++ b/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go @@ -0,0 +1,16 @@ +//go:build !go1.17 +// +build !go1.17 + +// TODO: once support for Go 1.16 is dropped, this file can be +// merged/removed with assertion_compare_go1.17_test.go and +// assertion_compare_can_convert.go + +package assert + +import "reflect" + +// Older versions of Go does not have the reflect.Value.CanConvert +// method. +func canConvert(value reflect.Value, to reflect.Type) bool { + return false +} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go b/vendor/github.com/stretchr/testify/assert/assertion_format.go index 4dfd122..27e2420 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_format.go @@ -123,6 +123,18 @@ func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...int return ErrorAs(t, err, target, append([]interface{}{msg}, args...)...) } +// ErrorContainsf asserts that a function returned an error (i.e. not `nil`) +// and that the error contains the specified substring. +// +// actualObj, err := SomeFunction() +// assert.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted") +func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + return ErrorContains(t, theError, contains, append([]interface{}{msg}, args...)...) +} + // ErrorIsf asserts that at least one of the errors in err's chain matches target. // This is a wrapper for errors.Is. func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool { diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/vendor/github.com/stretchr/testify/assert/assertion_forward.go index 25337a6..d9ea368 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_forward.go @@ -222,6 +222,30 @@ func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args .. return ErrorAsf(a.t, err, target, msg, args...) } +// ErrorContains asserts that a function returned an error (i.e. not `nil`) +// and that the error contains the specified substring. +// +// actualObj, err := SomeFunction() +// a.ErrorContains(err, expectedErrorSubString) +func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return ErrorContains(a.t, theError, contains, msgAndArgs...) +} + +// ErrorContainsf asserts that a function returned an error (i.e. not `nil`) +// and that the error contains the specified substring. +// +// actualObj, err := SomeFunction() +// a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted") +func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return ErrorContainsf(a.t, theError, contains, msg, args...) +} + // ErrorIs asserts that at least one of the errors in err's chain matches target. // This is a wrapper for errors.Is. func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) bool { diff --git a/vendor/github.com/stretchr/testify/assert/assertion_order.go b/vendor/github.com/stretchr/testify/assert/assertion_order.go index 1c3b471..7594487 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_order.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_order.go @@ -50,7 +50,7 @@ func isOrdered(t TestingT, object interface{}, allowedComparesResults []CompareT // assert.IsIncreasing(t, []float{1, 2}) // assert.IsIncreasing(t, []string{"a", "b"}) func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs) + return isOrdered(t, object, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...) } // IsNonIncreasing asserts that the collection is not increasing @@ -59,7 +59,7 @@ func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) boo // assert.IsNonIncreasing(t, []float{2, 1}) // assert.IsNonIncreasing(t, []string{"b", "a"}) func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []CompareType{compareEqual, compareGreater}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs) + return isOrdered(t, object, []CompareType{compareEqual, compareGreater}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...) } // IsDecreasing asserts that the collection is decreasing @@ -68,7 +68,7 @@ func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) // assert.IsDecreasing(t, []float{2, 1}) // assert.IsDecreasing(t, []string{"b", "a"}) func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs) + return isOrdered(t, object, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...) } // IsNonDecreasing asserts that the collection is not decreasing @@ -77,5 +77,5 @@ func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) boo // assert.IsNonDecreasing(t, []float{1, 2}) // assert.IsNonDecreasing(t, []string{"a", "b"}) func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs) + return isOrdered(t, object, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...) } diff --git a/vendor/github.com/stretchr/testify/assert/assertions.go b/vendor/github.com/stretchr/testify/assert/assertions.go index bcac440..580fdea 100644 --- a/vendor/github.com/stretchr/testify/assert/assertions.go +++ b/vendor/github.com/stretchr/testify/assert/assertions.go @@ -563,16 +563,17 @@ func isEmpty(object interface{}) bool { switch objValue.Kind() { // collection types are empty when they have no element - case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice: + case reflect.Chan, reflect.Map, reflect.Slice: return objValue.Len() == 0 - // pointers are empty if nil or if the value they point to is empty + // pointers are empty if nil or if the value they point to is empty case reflect.Ptr: if objValue.IsNil() { return true } deref := objValue.Elem().Interface() return isEmpty(deref) - // for all other types, compare against the zero value + // for all other types, compare against the zero value + // array types are empty when they match their zero-initialized state default: zero := reflect.Zero(objValue.Type()) return reflect.DeepEqual(object, zero.Interface()) @@ -718,10 +719,14 @@ func NotEqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...inte // return (false, false) if impossible. // return (true, false) if element was not found. // return (true, true) if element was found. -func includeElement(list interface{}, element interface{}) (ok, found bool) { +func containsElement(list interface{}, element interface{}) (ok, found bool) { listValue := reflect.ValueOf(list) - listKind := reflect.TypeOf(list).Kind() + listType := reflect.TypeOf(list) + if listType == nil { + return false, false + } + listKind := listType.Kind() defer func() { if e := recover(); e != nil { ok = false @@ -764,7 +769,7 @@ func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bo h.Helper() } - ok, found := includeElement(s, contains) + ok, found := containsElement(s, contains) if !ok { return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", s), msgAndArgs...) } @@ -787,7 +792,7 @@ func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) h.Helper() } - ok, found := includeElement(s, contains) + ok, found := containsElement(s, contains) if !ok { return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", s), msgAndArgs...) } @@ -831,7 +836,7 @@ func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok for i := 0; i < subsetValue.Len(); i++ { element := subsetValue.Index(i).Interface() - ok, found := includeElement(list, element) + ok, found := containsElement(list, element) if !ok { return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...) } @@ -852,7 +857,7 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) h.Helper() } if subset == nil { - return Fail(t, fmt.Sprintf("nil is the empty set which is a subset of every set"), msgAndArgs...) + return Fail(t, "nil is the empty set which is a subset of every set", msgAndArgs...) } subsetValue := reflect.ValueOf(subset) @@ -875,7 +880,7 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) for i := 0; i < subsetValue.Len(); i++ { element := subsetValue.Index(i).Interface() - ok, found := includeElement(list, element) + ok, found := containsElement(list, element) if !ok { return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...) } @@ -1000,27 +1005,21 @@ func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool { type PanicTestFunc func() // didPanic returns true if the function passed to it panics. Otherwise, it returns false. -func didPanic(f PanicTestFunc) (bool, interface{}, string) { - - didPanic := false - var message interface{} - var stack string - func() { - - defer func() { - if message = recover(); message != nil { - didPanic = true - stack = string(debug.Stack()) - } - }() - - // call the target function - f() +func didPanic(f PanicTestFunc) (didPanic bool, message interface{}, stack string) { + didPanic = true + defer func() { + message = recover() + if didPanic { + stack = string(debug.Stack()) + } }() - return didPanic, message, stack + // call the target function + f() + didPanic = false + return } // Panics asserts that the code inside the specified PanicTestFunc panics. @@ -1161,11 +1160,15 @@ func InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs bf, bok := toFloat(actual) if !aok || !bok { - return Fail(t, fmt.Sprintf("Parameters must be numerical"), msgAndArgs...) + return Fail(t, "Parameters must be numerical", msgAndArgs...) + } + + if math.IsNaN(af) && math.IsNaN(bf) { + return true } if math.IsNaN(af) { - return Fail(t, fmt.Sprintf("Expected must not be NaN"), msgAndArgs...) + return Fail(t, "Expected must not be NaN", msgAndArgs...) } if math.IsNaN(bf) { @@ -1188,7 +1191,7 @@ func InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, msgAn if expected == nil || actual == nil || reflect.TypeOf(actual).Kind() != reflect.Slice || reflect.TypeOf(expected).Kind() != reflect.Slice { - return Fail(t, fmt.Sprintf("Parameters must be slice"), msgAndArgs...) + return Fail(t, "Parameters must be slice", msgAndArgs...) } actualSlice := reflect.ValueOf(actual) @@ -1250,8 +1253,12 @@ func InDeltaMapValues(t TestingT, expected, actual interface{}, delta float64, m func calcRelativeError(expected, actual interface{}) (float64, error) { af, aok := toFloat(expected) - if !aok { - return 0, fmt.Errorf("expected value %q cannot be converted to float", expected) + bf, bok := toFloat(actual) + if !aok || !bok { + return 0, fmt.Errorf("Parameters must be numerical") + } + if math.IsNaN(af) && math.IsNaN(bf) { + return 0, nil } if math.IsNaN(af) { return 0, errors.New("expected value must not be NaN") @@ -1259,10 +1266,6 @@ func calcRelativeError(expected, actual interface{}) (float64, error) { if af == 0 { return 0, fmt.Errorf("expected value must have a value other than zero to calculate the relative error") } - bf, bok := toFloat(actual) - if !bok { - return 0, fmt.Errorf("actual value %q cannot be converted to float", actual) - } if math.IsNaN(bf) { return 0, errors.New("actual value must not be NaN") } @@ -1298,7 +1301,7 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m if expected == nil || actual == nil || reflect.TypeOf(actual).Kind() != reflect.Slice || reflect.TypeOf(expected).Kind() != reflect.Slice { - return Fail(t, fmt.Sprintf("Parameters must be slice"), msgAndArgs...) + return Fail(t, "Parameters must be slice", msgAndArgs...) } actualSlice := reflect.ValueOf(actual) @@ -1375,6 +1378,27 @@ func EqualError(t TestingT, theError error, errString string, msgAndArgs ...inte return true } +// ErrorContains asserts that a function returned an error (i.e. not `nil`) +// and that the error contains the specified substring. +// +// actualObj, err := SomeFunction() +// assert.ErrorContains(t, err, expectedErrorSubString) +func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + if !Error(t, theError, msgAndArgs...) { + return false + } + + actual := theError.Error() + if !strings.Contains(actual, contains) { + return Fail(t, fmt.Sprintf("Error %#v does not contain %#v", actual, contains), msgAndArgs...) + } + + return true +} + // matchRegexp return true if a specified regexp matches a string. func matchRegexp(rx interface{}, str interface{}) bool { @@ -1588,12 +1612,17 @@ func diff(expected interface{}, actual interface{}) string { } var e, a string - if et != reflect.TypeOf("") { - e = spewConfig.Sdump(expected) - a = spewConfig.Sdump(actual) - } else { + + switch et { + case reflect.TypeOf(""): e = reflect.ValueOf(expected).String() a = reflect.ValueOf(actual).String() + case reflect.TypeOf(time.Time{}): + e = spewConfigStringerEnabled.Sdump(expected) + a = spewConfigStringerEnabled.Sdump(actual) + default: + e = spewConfig.Sdump(expected) + a = spewConfig.Sdump(actual) } diff, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{ @@ -1625,6 +1654,14 @@ var spewConfig = spew.ConfigState{ MaxDepth: 10, } +var spewConfigStringerEnabled = spew.ConfigState{ + Indent: " ", + DisablePointerAddresses: true, + DisableCapacities: true, + SortKeys: true, + MaxDepth: 10, +} + type tHelper interface { Helper() } diff --git a/vendor/github.com/stretchr/testify/require/require.go b/vendor/github.com/stretchr/testify/require/require.go index 51820df..59c4827 100644 --- a/vendor/github.com/stretchr/testify/require/require.go +++ b/vendor/github.com/stretchr/testify/require/require.go @@ -280,6 +280,36 @@ func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...int t.FailNow() } +// ErrorContains asserts that a function returned an error (i.e. not `nil`) +// and that the error contains the specified substring. +// +// actualObj, err := SomeFunction() +// assert.ErrorContains(t, err, expectedErrorSubString) +func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) { + if h, ok := t.(tHelper); ok { + h.Helper() + } + if assert.ErrorContains(t, theError, contains, msgAndArgs...) { + return + } + t.FailNow() +} + +// ErrorContainsf asserts that a function returned an error (i.e. not `nil`) +// and that the error contains the specified substring. +// +// actualObj, err := SomeFunction() +// assert.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted") +func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) { + if h, ok := t.(tHelper); ok { + h.Helper() + } + if assert.ErrorContainsf(t, theError, contains, msg, args...) { + return + } + t.FailNow() +} + // ErrorIs asserts that at least one of the errors in err's chain matches target. // This is a wrapper for errors.Is. func ErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) { diff --git a/vendor/github.com/stretchr/testify/require/require_forward.go b/vendor/github.com/stretchr/testify/require/require_forward.go index ed54a9d..5bb07c8 100644 --- a/vendor/github.com/stretchr/testify/require/require_forward.go +++ b/vendor/github.com/stretchr/testify/require/require_forward.go @@ -223,6 +223,30 @@ func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args .. ErrorAsf(a.t, err, target, msg, args...) } +// ErrorContains asserts that a function returned an error (i.e. not `nil`) +// and that the error contains the specified substring. +// +// actualObj, err := SomeFunction() +// a.ErrorContains(err, expectedErrorSubString) +func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + ErrorContains(a.t, theError, contains, msgAndArgs...) +} + +// ErrorContainsf asserts that a function returned an error (i.e. not `nil`) +// and that the error contains the specified substring. +// +// actualObj, err := SomeFunction() +// a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted") +func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + ErrorContainsf(a.t, theError, contains, msg, args...) +} + // ErrorIs asserts that at least one of the errors in err's chain matches target. // This is a wrapper for errors.Is. func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) { diff --git a/vendor/gopkg.in/yaml.v3/.travis.yml b/vendor/gopkg.in/yaml.v3/.travis.yml deleted file mode 100644 index 04d4dae..0000000 --- a/vendor/gopkg.in/yaml.v3/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: go - -go: - - "1.4.x" - - "1.5.x" - - "1.6.x" - - "1.7.x" - - "1.8.x" - - "1.9.x" - - "1.10.x" - - "1.11.x" - - "1.12.x" - - "1.13.x" - - "tip" - -go_import_path: gopkg.in/yaml.v3 diff --git a/vendor/gopkg.in/yaml.v3/apic.go b/vendor/gopkg.in/yaml.v3/apic.go index 65846e6..ae7d049 100644 --- a/vendor/gopkg.in/yaml.v3/apic.go +++ b/vendor/gopkg.in/yaml.v3/apic.go @@ -108,6 +108,7 @@ func yaml_emitter_initialize(emitter *yaml_emitter_t) { raw_buffer: make([]byte, 0, output_raw_buffer_size), states: make([]yaml_emitter_state_t, 0, initial_stack_size), events: make([]yaml_event_t, 0, initial_queue_size), + best_width: -1, } } diff --git a/vendor/gopkg.in/yaml.v3/decode.go b/vendor/gopkg.in/yaml.v3/decode.go index be63169..0173b69 100644 --- a/vendor/gopkg.in/yaml.v3/decode.go +++ b/vendor/gopkg.in/yaml.v3/decode.go @@ -35,6 +35,7 @@ type parser struct { doc *Node anchors map[string]*Node doneInit bool + textless bool } func newParser(b []byte) *parser { @@ -99,7 +100,10 @@ func (p *parser) peek() yaml_event_type_t { if p.event.typ != yaml_NO_EVENT { return p.event.typ } - if !yaml_parser_parse(&p.parser, &p.event) { + // It's curious choice from the underlying API to generally return a + // positive result on success, but on this case return true in an error + // scenario. This was the source of bugs in the past (issue #666). + if !yaml_parser_parse(&p.parser, &p.event) || p.parser.error != yaml_NO_ERROR { p.fail() } return p.event.typ @@ -108,14 +112,18 @@ func (p *parser) peek() yaml_event_type_t { func (p *parser) fail() { var where string var line int - if p.parser.problem_mark.line != 0 { + if p.parser.context_mark.line != 0 { + line = p.parser.context_mark.line + // Scanner errors don't iterate line before returning error + if p.parser.error == yaml_SCANNER_ERROR { + line++ + } + } else if p.parser.problem_mark.line != 0 { line = p.parser.problem_mark.line // Scanner errors don't iterate line before returning error if p.parser.error == yaml_SCANNER_ERROR { line++ } - } else if p.parser.context_mark.line != 0 { - line = p.parser.context_mark.line } if line != 0 { where = "line " + strconv.Itoa(line) + ": " @@ -169,17 +177,20 @@ func (p *parser) node(kind Kind, defaultTag, tag, value string) *Node { } else if kind == ScalarNode { tag, _ = resolve("", value) } - return &Node{ - Kind: kind, - Tag: tag, - Value: value, - Style: style, - Line: p.event.start_mark.line + 1, - Column: p.event.start_mark.column + 1, - HeadComment: string(p.event.head_comment), - LineComment: string(p.event.line_comment), - FootComment: string(p.event.foot_comment), + n := &Node{ + Kind: kind, + Tag: tag, + Value: value, + Style: style, + } + if !p.textless { + n.Line = p.event.start_mark.line + 1 + n.Column = p.event.start_mark.column + 1 + n.HeadComment = string(p.event.head_comment) + n.LineComment = string(p.event.line_comment) + n.FootComment = string(p.event.foot_comment) } + return n } func (p *parser) parseChild(parent *Node) *Node { @@ -312,6 +323,8 @@ type decoder struct { decodeCount int aliasCount int aliasDepth int + + mergedFields map[interface{}]bool } var ( @@ -497,8 +510,13 @@ func (d *decoder) unmarshal(n *Node, out reflect.Value) (good bool) { good = d.mapping(n, out) case SequenceNode: good = d.sequence(n, out) + case 0: + if n.IsZero() { + return d.null(out) + } + fallthrough default: - panic("internal error: unknown node kind: " + strconv.Itoa(int(n.Kind))) + failf("cannot decode node with unknown kind %d", n.Kind) } return good } @@ -533,6 +551,17 @@ func resetMap(out reflect.Value) { } } +func (d *decoder) null(out reflect.Value) bool { + if out.CanAddr() { + switch out.Kind() { + case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice: + out.Set(reflect.Zero(out.Type())) + return true + } + } + return false +} + func (d *decoder) scalar(n *Node, out reflect.Value) bool { var tag string var resolved interface{} @@ -550,14 +579,7 @@ func (d *decoder) scalar(n *Node, out reflect.Value) bool { } } if resolved == nil { - if out.CanAddr() { - switch out.Kind() { - case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice: - out.Set(reflect.Zero(out.Type())) - return true - } - } - return false + return d.null(out) } if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { // We've resolved to exactly the type we want, so use that. @@ -791,16 +813,30 @@ func (d *decoder) mapping(n *Node, out reflect.Value) (good bool) { } } + mergedFields := d.mergedFields + d.mergedFields = nil + + var mergeNode *Node + + mapIsNew := false if out.IsNil() { out.Set(reflect.MakeMap(outt)) + mapIsNew = true } for i := 0; i < l; i += 2 { if isMerge(n.Content[i]) { - d.merge(n.Content[i+1], out) + mergeNode = n.Content[i+1] continue } k := reflect.New(kt).Elem() if d.unmarshal(n.Content[i], k) { + if mergedFields != nil { + ki := k.Interface() + if mergedFields[ki] { + continue + } + mergedFields[ki] = true + } kkind := k.Kind() if kkind == reflect.Interface { kkind = k.Elem().Kind() @@ -809,11 +845,17 @@ func (d *decoder) mapping(n *Node, out reflect.Value) (good bool) { failf("invalid map key: %#v", k.Interface()) } e := reflect.New(et).Elem() - if d.unmarshal(n.Content[i+1], e) { + if d.unmarshal(n.Content[i+1], e) || n.Content[i+1].ShortTag() == nullTag && (mapIsNew || !out.MapIndex(k).IsValid()) { out.SetMapIndex(k, e) } } } + + d.mergedFields = mergedFields + if mergeNode != nil { + d.merge(n, mergeNode, out) + } + d.stringMapType = stringMapType d.generalMapType = generalMapType return true @@ -825,7 +867,8 @@ func isStringMap(n *Node) bool { } l := len(n.Content) for i := 0; i < l; i += 2 { - if n.Content[i].ShortTag() != strTag { + shortTag := n.Content[i].ShortTag() + if shortTag != strTag && shortTag != mergeTag { return false } } @@ -842,7 +885,6 @@ func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) { var elemType reflect.Type if sinfo.InlineMap != -1 { inlineMap = out.Field(sinfo.InlineMap) - inlineMap.Set(reflect.New(inlineMap.Type()).Elem()) elemType = inlineMap.Type().Elem() } @@ -851,6 +893,9 @@ func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) { d.prepare(n, field) } + mergedFields := d.mergedFields + d.mergedFields = nil + var mergeNode *Node var doneFields []bool if d.uniqueKeys { doneFields = make([]bool, len(sinfo.FieldsList)) @@ -860,13 +905,20 @@ func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) { for i := 0; i < l; i += 2 { ni := n.Content[i] if isMerge(ni) { - d.merge(n.Content[i+1], out) + mergeNode = n.Content[i+1] continue } if !d.unmarshal(ni, name) { continue } - if info, ok := sinfo.FieldsMap[name.String()]; ok { + sname := name.String() + if mergedFields != nil { + if mergedFields[sname] { + continue + } + mergedFields[sname] = true + } + if info, ok := sinfo.FieldsMap[sname]; ok { if d.uniqueKeys { if doneFields[info.Id] { d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s already set in type %s", ni.Line, name.String(), out.Type())) @@ -892,6 +944,11 @@ func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) { d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in type %s", ni.Line, name.String(), out.Type())) } } + + d.mergedFields = mergedFields + if mergeNode != nil { + d.merge(n, mergeNode, out) + } return true } @@ -899,19 +956,29 @@ func failWantMap() { failf("map merge requires map or sequence of maps as the value") } -func (d *decoder) merge(n *Node, out reflect.Value) { - switch n.Kind { +func (d *decoder) merge(parent *Node, merge *Node, out reflect.Value) { + mergedFields := d.mergedFields + if mergedFields == nil { + d.mergedFields = make(map[interface{}]bool) + for i := 0; i < len(parent.Content); i += 2 { + k := reflect.New(ifaceType).Elem() + if d.unmarshal(parent.Content[i], k) { + d.mergedFields[k.Interface()] = true + } + } + } + + switch merge.Kind { case MappingNode: - d.unmarshal(n, out) + d.unmarshal(merge, out) case AliasNode: - if n.Alias != nil && n.Alias.Kind != MappingNode { + if merge.Alias != nil && merge.Alias.Kind != MappingNode { failWantMap() } - d.unmarshal(n, out) + d.unmarshal(merge, out) case SequenceNode: - // Step backwards as earlier nodes take precedence. - for i := len(n.Content) - 1; i >= 0; i-- { - ni := n.Content[i] + for i := 0; i < len(merge.Content); i++ { + ni := merge.Content[i] if ni.Kind == AliasNode { if ni.Alias != nil && ni.Alias.Kind != MappingNode { failWantMap() @@ -924,6 +991,8 @@ func (d *decoder) merge(n *Node, out reflect.Value) { default: failWantMap() } + + d.mergedFields = mergedFields } func isMerge(n *Node) bool { diff --git a/vendor/gopkg.in/yaml.v3/emitterc.go b/vendor/gopkg.in/yaml.v3/emitterc.go index ab2a066..0f47c9c 100644 --- a/vendor/gopkg.in/yaml.v3/emitterc.go +++ b/vendor/gopkg.in/yaml.v3/emitterc.go @@ -235,10 +235,13 @@ func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool emitter.indent = 0 } } else if !indentless { - emitter.indent += emitter.best_indent - // [Go] If inside a block sequence item, discount the space taken by the indicator. - if emitter.best_indent > 2 && emitter.states[len(emitter.states)-1] == yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE { - emitter.indent -= 2 + // [Go] This was changed so that indentations are more regular. + if emitter.states[len(emitter.states)-1] == yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE { + // The first indent inside a sequence will just skip the "- " indicator. + emitter.indent += 2 + } else { + // Everything else aligns to the chosen indentation. + emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) } } return true @@ -725,16 +728,9 @@ func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_e // Expect a block item node. func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { if first { - // [Go] The original logic here would not indent the sequence when inside a mapping. - // In Go we always indent it, but take the sequence indicator out of the indentation. - indentless := emitter.best_indent == 2 && emitter.mapping_context && (emitter.column == 0 || !emitter.indention) - original := emitter.indent - if !yaml_emitter_increase_indent(emitter, false, indentless) { + if !yaml_emitter_increase_indent(emitter, false, false) { return false } - if emitter.indent > original+2 { - emitter.indent -= 2 - } } if event.typ == yaml_SEQUENCE_END_EVENT { emitter.indent = emitter.indents[len(emitter.indents)-1] @@ -785,6 +781,13 @@ func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_ev if !yaml_emitter_write_indent(emitter) { return false } + if len(emitter.line_comment) > 0 { + // [Go] A line comment was provided for the key. That's unusual as the + // scanner associates line comments with the value. Either way, + // save the line comment and render it appropriately later. + emitter.key_line_comment = emitter.line_comment + emitter.line_comment = nil + } if yaml_emitter_check_simple_key(emitter) { emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE) return yaml_emitter_emit_node(emitter, event, false, false, true, true) @@ -810,6 +813,27 @@ func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_ return false } } + if len(emitter.key_line_comment) > 0 { + // [Go] Line comments are generally associated with the value, but when there's + // no value on the same line as a mapping key they end up attached to the + // key itself. + if event.typ == yaml_SCALAR_EVENT { + if len(emitter.line_comment) == 0 { + // A scalar is coming and it has no line comments by itself yet, + // so just let it handle the line comment as usual. If it has a + // line comment, we can't have both so the one from the key is lost. + emitter.line_comment = emitter.key_line_comment + emitter.key_line_comment = nil + } + } else if event.sequence_style() != yaml_FLOW_SEQUENCE_STYLE && (event.typ == yaml_MAPPING_START_EVENT || event.typ == yaml_SEQUENCE_START_EVENT) { + // An indented block follows, so write the comment right now. + emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment + if !yaml_emitter_process_line_comment(emitter) { + return false + } + emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment + } + } emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE) if !yaml_emitter_emit_node(emitter, event, false, false, true, false) { return false @@ -823,6 +847,10 @@ func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_ return true } +func yaml_emitter_silent_nil_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { + return event.typ == yaml_SCALAR_EVENT && event.implicit && !emitter.canonical && len(emitter.scalar_data.value) == 0 +} + // Expect a node. func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, root bool, sequence bool, mapping bool, simple_key bool) bool { @@ -1866,7 +1894,7 @@ func yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []byte) bo if !yaml_emitter_write_block_scalar_hints(emitter, value) { return false } - if !put_break(emitter) { + if !yaml_emitter_process_line_comment(emitter) { return false } //emitter.indention = true @@ -1903,10 +1931,10 @@ func yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []byte) boo if !yaml_emitter_write_block_scalar_hints(emitter, value) { return false } - - if !put_break(emitter) { + if !yaml_emitter_process_line_comment(emitter) { return false } + //emitter.indention = true emitter.whitespace = true diff --git a/vendor/gopkg.in/yaml.v3/encode.go b/vendor/gopkg.in/yaml.v3/encode.go index 1f37271..de9e72a 100644 --- a/vendor/gopkg.in/yaml.v3/encode.go +++ b/vendor/gopkg.in/yaml.v3/encode.go @@ -119,6 +119,14 @@ func (e *encoder) marshal(tag string, in reflect.Value) { case *Node: e.nodev(in) return + case Node: + if !in.CanAddr() { + var n = reflect.New(in.Type()).Elem() + n.Set(in) + in = n + } + e.nodev(in.Addr()) + return case time.Time: e.timev(tag, in) return @@ -422,18 +430,23 @@ func (e *encoder) nodev(in reflect.Value) { } func (e *encoder) node(node *Node, tail string) { + // Zero nodes behave as nil. + if node.Kind == 0 && node.IsZero() { + e.nilv() + return + } + // If the tag was not explicitly requested, and dropping it won't change the // implicit tag of the value, don't include it in the presentation. var tag = node.Tag var stag = shortTag(tag) - var rtag string var forceQuoting bool if tag != "" && node.Style&TaggedStyle == 0 { if node.Kind == ScalarNode { if stag == strTag && node.Style&(SingleQuotedStyle|DoubleQuotedStyle|LiteralStyle|FoldedStyle) != 0 { tag = "" } else { - rtag, _ = resolve("", node.Value) + rtag, _ := resolve("", node.Value) if rtag == stag { tag = "" } else if stag == strTag { @@ -442,6 +455,7 @@ func (e *encoder) node(node *Node, tail string) { } } } else { + var rtag string switch node.Kind { case MappingNode: rtag = mapTag @@ -471,7 +485,7 @@ func (e *encoder) node(node *Node, tail string) { if node.Style&FlowStyle != 0 { style = yaml_FLOW_SEQUENCE_STYLE } - e.must(yaml_sequence_start_event_initialize(&e.event, []byte(node.Anchor), []byte(tag), tag == "", style)) + e.must(yaml_sequence_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == "", style)) e.event.head_comment = []byte(node.HeadComment) e.emit() for _, node := range node.Content { @@ -487,7 +501,7 @@ func (e *encoder) node(node *Node, tail string) { if node.Style&FlowStyle != 0 { style = yaml_FLOW_MAPPING_STYLE } - yaml_mapping_start_event_initialize(&e.event, []byte(node.Anchor), []byte(tag), tag == "", style) + yaml_mapping_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == "", style) e.event.tail_comment = []byte(tail) e.event.head_comment = []byte(node.HeadComment) e.emit() @@ -528,11 +542,11 @@ func (e *encoder) node(node *Node, tail string) { case ScalarNode: value := node.Value if !utf8.ValidString(value) { - if tag == binaryTag { + if stag == binaryTag { failf("explicitly tagged !!binary data must be base64-encoded") } - if tag != "" { - failf("cannot marshal invalid UTF-8 data as %s", shortTag(tag)) + if stag != "" { + failf("cannot marshal invalid UTF-8 data as %s", stag) } // It can't be encoded directly as YAML so use a binary tag // and encode it as base64. @@ -557,5 +571,7 @@ func (e *encoder) node(node *Node, tail string) { } e.emitScalar(value, node.Anchor, tag, style, []byte(node.HeadComment), []byte(node.LineComment), []byte(node.FootComment), []byte(tail)) + default: + failf("cannot encode node with unknown kind %d", node.Kind) } } diff --git a/vendor/gopkg.in/yaml.v3/parserc.go b/vendor/gopkg.in/yaml.v3/parserc.go index aea9050..268558a 100644 --- a/vendor/gopkg.in/yaml.v3/parserc.go +++ b/vendor/gopkg.in/yaml.v3/parserc.go @@ -648,6 +648,10 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i implicit: implicit, style: yaml_style_t(yaml_BLOCK_MAPPING_STYLE), } + if parser.stem_comment != nil { + event.head_comment = parser.stem_comment + parser.stem_comment = nil + } return true } if len(anchor) > 0 || len(tag) > 0 { @@ -683,6 +687,9 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) + if token == nil { + return false + } parser.marks = append(parser.marks, token.start_mark) skip_token(parser) } @@ -694,25 +701,13 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e if token.typ == yaml_BLOCK_ENTRY_TOKEN { mark := token.end_mark - prior_head := len(parser.head_comment) + prior_head_len := len(parser.head_comment) skip_token(parser) + yaml_parser_split_stem_comment(parser, prior_head_len) token = peek_token(parser) if token == nil { return false } - if prior_head > 0 && token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN { - // [Go] It's a sequence under a sequence entry, so the former head comment - // is for the list itself, not the first list item under it. - parser.stem_comment = parser.head_comment[:prior_head] - if len(parser.head_comment) == prior_head { - parser.head_comment = nil - } else { - // Copy suffix to prevent very strange bugs if someone ever appends - // further bytes to the prefix in the stem_comment slice above. - parser.head_comment = append([]byte(nil), parser.head_comment[prior_head+1:]...) - } - - } if token.typ != yaml_BLOCK_ENTRY_TOKEN && token.typ != yaml_BLOCK_END_TOKEN { parser.states = append(parser.states, yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE) return yaml_parser_parse_node(parser, event, true, false) @@ -754,7 +749,9 @@ func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *y if token.typ == yaml_BLOCK_ENTRY_TOKEN { mark := token.end_mark + prior_head_len := len(parser.head_comment) skip_token(parser) + yaml_parser_split_stem_comment(parser, prior_head_len) token = peek_token(parser) if token == nil { return false @@ -780,6 +777,32 @@ func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *y return true } +// Split stem comment from head comment. +// +// When a sequence or map is found under a sequence entry, the former head comment +// is assigned to the underlying sequence or map as a whole, not the individual +// sequence or map entry as would be expected otherwise. To handle this case the +// previous head comment is moved aside as the stem comment. +func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { + if stem_len == 0 { + return + } + + token := peek_token(parser) + if token == nil || token.typ != yaml_BLOCK_SEQUENCE_START_TOKEN && token.typ != yaml_BLOCK_MAPPING_START_TOKEN { + return + } + + parser.stem_comment = parser.head_comment[:stem_len] + if len(parser.head_comment) == stem_len { + parser.head_comment = nil + } else { + // Copy suffix to prevent very strange bugs if someone ever appends + // further bytes to the prefix in the stem_comment slice above. + parser.head_comment = append([]byte(nil), parser.head_comment[stem_len+1:]...) + } +} + // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // ******************* @@ -793,6 +816,9 @@ func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *y func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) + if token == nil { + return false + } parser.marks = append(parser.marks, token.start_mark) skip_token(parser) } @@ -902,6 +928,9 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) + if token == nil { + return false + } parser.marks = append(parser.marks, token.start_mark) skip_token(parser) } diff --git a/vendor/gopkg.in/yaml.v3/scannerc.go b/vendor/gopkg.in/yaml.v3/scannerc.go index 57e954c..ca00701 100644 --- a/vendor/gopkg.in/yaml.v3/scannerc.go +++ b/vendor/gopkg.in/yaml.v3/scannerc.go @@ -749,6 +749,11 @@ func yaml_parser_fetch_next_token(parser *yaml_parser_t) (ok bool) { if !ok { return } + if len(parser.tokens) > 0 && parser.tokens[len(parser.tokens)-1].typ == yaml_BLOCK_ENTRY_TOKEN { + // Sequence indicators alone have no line comments. It becomes + // a head comment for whatever follows. + return + } if !yaml_parser_scan_line_comment(parser, comment_mark) { ok = false return @@ -2255,10 +2260,9 @@ func yaml_parser_scan_block_scalar(parser *yaml_parser_t, token *yaml_token_t, l } } if parser.buffer[parser.buffer_pos] == '#' { - // TODO Test this and then re-enable it. - //if !yaml_parser_scan_line_comment(parser, start_mark) { - // return false - //} + if !yaml_parser_scan_line_comment(parser, start_mark) { + return false + } for !is_breakz(parser.buffer, parser.buffer_pos) { skip(parser) if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -2856,13 +2860,12 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t return false } skip_line(parser) - } else { - if parser.mark.index >= seen { - if len(text) == 0 { - start_mark = parser.mark - } - text = append(text, parser.buffer[parser.buffer_pos]) + } else if parser.mark.index >= seen { + if len(text) == 0 { + start_mark = parser.mark } + text = read(parser, text) + } else { skip(parser) } } @@ -2888,6 +2891,10 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo var token_mark = token.start_mark var start_mark yaml_mark_t + var next_indent = parser.indent + if next_indent < 0 { + next_indent = 0 + } var recent_empty = false var first_empty = parser.newlines <= 1 @@ -2919,15 +2926,18 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo continue } c := parser.buffer[parser.buffer_pos+peek] - if is_breakz(parser.buffer, parser.buffer_pos+peek) || parser.flow_level > 0 && (c == ']' || c == '}') { + var close_flow = parser.flow_level > 0 && (c == ']' || c == '}') + if close_flow || is_breakz(parser.buffer, parser.buffer_pos+peek) { // Got line break or terminator. - if !recent_empty { - if first_empty && (start_mark.line == foot_line || start_mark.column-1 < parser.indent) { + if close_flow || !recent_empty { + if close_flow || first_empty && (start_mark.line == foot_line && token.typ != yaml_VALUE_TOKEN || start_mark.column-1 < next_indent) { // This is the first empty line and there were no empty lines before, // so this initial part of the comment is a foot of the prior token // instead of being a head for the following one. Split it up. + // Alternatively, this might also be the last comment inside a flow + // scope, so it must be a footer. if len(text) > 0 { - if start_mark.column-1 < parser.indent { + if start_mark.column-1 < next_indent { // If dedented it's unrelated to the prior token. token_mark = start_mark } @@ -2958,7 +2968,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo continue } - if len(text) > 0 && column < parser.indent+1 && column != start_mark.column { + if len(text) > 0 && (close_flow || column-1 < next_indent && column != start_mark.column) { // The comment at the different indentation is a foot of the // preceding data rather than a head of the upcoming one. parser.comments = append(parser.comments, yaml_comment_t{ @@ -2999,10 +3009,9 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo return false } skip_line(parser) + } else if parser.mark.index >= seen { + text = read(parser, text) } else { - if parser.mark.index >= seen { - text = append(text, parser.buffer[parser.buffer_pos]) - } skip(parser) } } @@ -3010,6 +3019,10 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo peek = 0 column = 0 line = parser.mark.line + next_indent = parser.indent + if next_indent < 0 { + next_indent = 0 + } } if len(text) > 0 { diff --git a/vendor/gopkg.in/yaml.v3/yaml.go b/vendor/gopkg.in/yaml.v3/yaml.go index b5d35a5..8cec6da 100644 --- a/vendor/gopkg.in/yaml.v3/yaml.go +++ b/vendor/gopkg.in/yaml.v3/yaml.go @@ -89,7 +89,7 @@ func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } -// A Decorder reads and decodes YAML values from an input stream. +// A Decoder reads and decodes YAML values from an input stream. type Decoder struct { parser *parser knownFields bool @@ -194,7 +194,7 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // Zero valued structs will be omitted if all their public // fields are zero, unless they implement an IsZero // method (see the IsZeroer interface type), in which -// case the field will be included if that method returns true. +// case the field will be excluded if IsZero returns true. // // flow Marshal using a flow style (useful for structs, // sequences and maps). @@ -252,6 +252,24 @@ func (e *Encoder) Encode(v interface{}) (err error) { return nil } +// Encode encodes value v and stores its representation in n. +// +// See the documentation for Marshal for details about the +// conversion of Go values into YAML. +func (n *Node) Encode(v interface{}) (err error) { + defer handleErr(&err) + e := newEncoder() + defer e.destroy() + e.marshalDoc("", reflect.ValueOf(v)) + e.finish() + p := newParser(e.out) + p.textless = true + defer p.destroy() + doc := p.parse() + *n = *doc.Content[0] + return nil +} + // SetIndent changes the used indentation used when encoding. func (e *Encoder) SetIndent(spaces int) { if spaces < 0 { @@ -328,6 +346,12 @@ const ( // and maps, Node is an intermediate representation that allows detailed // control over the content being decoded or encoded. // +// It's worth noting that although Node offers access into details such as +// line numbers, colums, and comments, the content when re-encoded will not +// have its original textual representation preserved. An effort is made to +// render the data plesantly, and to preserve comments near the data they +// describe, though. +// // Values that make use of the Node type interact with the yaml package in the // same way any other type would do, by encoding and decoding yaml data // directly or indirectly into them. @@ -391,6 +415,13 @@ type Node struct { Column int } +// IsZero returns whether the node has all of its fields unset. +func (n *Node) IsZero() bool { + return n.Kind == 0 && n.Style == 0 && n.Tag == "" && n.Value == "" && n.Anchor == "" && n.Alias == nil && n.Content == nil && + n.HeadComment == "" && n.LineComment == "" && n.FootComment == "" && n.Line == 0 && n.Column == 0 +} + + // LongTag returns the long form of the tag that indicates the data type for // the node. If the Tag field isn't explicitly defined, one will be computed // based on the node properties. @@ -418,6 +449,11 @@ func (n *Node) ShortTag() string { case ScalarNode: tag, _ := resolve("", n.Value) return tag + case 0: + // Special case to make the zero value convenient. + if n.IsZero() { + return nullTag + } } return "" } diff --git a/vendor/gopkg.in/yaml.v3/yamlh.go b/vendor/gopkg.in/yaml.v3/yamlh.go index 2719cfb..7c6d007 100644 --- a/vendor/gopkg.in/yaml.v3/yamlh.go +++ b/vendor/gopkg.in/yaml.v3/yamlh.go @@ -787,6 +787,8 @@ type yaml_emitter_t struct { foot_comment []byte tail_comment []byte + key_line_comment []byte + // Dumper stuff opened bool // If the stream was already opened? diff --git a/vendor/modules.txt b/vendor/modules.txt index 3eedc7e..cb5c270 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,10 +1,10 @@ -# github.com/cucumber/gherkin-go/v19 v19.0.3 +# github.com/cucumber/common/gherkin/go/v24 v24.0.0 ## explicit; go 1.13 -github.com/cucumber/gherkin-go/v19 -# github.com/cucumber/messages-go/v16 v16.0.1 +github.com/cucumber/common/gherkin/go/v24 +# github.com/cucumber/common/messages/go/v19 v19.1.2 ## explicit; go 1.13 -github.com/cucumber/messages-go/v16 -# github.com/davecgh/go-spew v1.1.0 +github.com/cucumber/common/messages/go/v19 +# github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew # github.com/gofrs/uuid v4.2.0+incompatible @@ -22,10 +22,10 @@ github.com/iancoleman/strcase # github.com/pmezard/go-difflib v1.0.0 ## explicit github.com/pmezard/go-difflib/difflib -# github.com/stretchr/testify v1.7.0 +# github.com/stretchr/testify v1.7.5 ## explicit; go 1.13 github.com/stretchr/testify/assert github.com/stretchr/testify/require -# gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c +# gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3