Вывод генерённых функций - со скобками на разных строках
Некоторые проверки провалились
test / test (1.16.x) (push) Has been cancelled
test / test (1.17.x) (push) Has been cancelled

Этот коммит содержится в:
Softonik 2024-06-17 14:18:34 +03:00 коммит произвёл Nobody
родитель 0da5fc6bcb
коммит eb165952fc
2 изменённых файлов: 30 добавлений и 15 удалений

Просмотреть файл

@ -24,8 +24,10 @@ Feature: undefined step snippets
// ---
func iSendRequestTo(arg1, arg2 string) { }
func theResponseCodeShouldBe(arg1 int) { }
func iSendRequestTo(arg1, arg2 string) {
}
func theResponseCodeShouldBe(arg1 int) {
}
ctx.Step(`^I send "([^"]*)" request to "([^"]*)"$`, iSendRequestTo)
ctx.Step(`^the response code should be (\d+)$`, theResponseCodeShouldBe)
@ -53,9 +55,12 @@ Feature: undefined step snippets
// ---
func iSendRequestToWith(arg1, arg2 string, arg3 *godog.Table) { }
func theResponseCodeShouldBeAndHeaderShouldBe(arg1 int, arg2, arg3 string) { }
func theResponseBodyShouldBe(arg1 *godog.DocString) { }
func iSendRequestToWith(arg1, arg2 string, arg3 *godog.Table) {
}
func theResponseCodeShouldBeAndHeaderShouldBe(arg1 int, arg2, arg3 string) {
}
func theResponseBodyShouldBe(arg1 *godog.DocString) {
}
ctx.Step(`^I send "([^"]*)" request to "([^"]*)" with:$`, iSendRequestToWith)
ctx.Step(`^the response code should be (\d+) and header "([^"]*)" should be "([^"]*)"$`, theResponseCodeShouldBeAndHeaderShouldBe)
@ -83,8 +88,10 @@ Feature: undefined step snippets
// ---
func iPullFromGithubcom() { }
func theProjectShouldBeThere() { }
func iPullFromGithubcom() {
}
func theProjectShouldBeThere() {
}
ctx.Step(`^I pull from github\.com$`, iPullFromGithubcom)
ctx.Step(`^the project should be there$`, theProjectShouldBeThere)
@ -106,8 +113,10 @@ Feature: undefined step snippets
// ---
func thereIsAWhichCosts(arg1 string, arg2 int) { }
func iAddTheToTheBasket(arg1 string) { }
func thereIsAWhichCosts(arg1 string, arg2 int) {
}
func iAddTheToTheBasket(arg1 string) {
}
ctx.Step(`^there is a "([^"]*)", which costs £(\d+)$`, thereIsAWhichCosts)
ctx.Step(`^I add the "([^"]*)" to the basket$`, iAddTheToTheBasket)
@ -129,8 +138,10 @@ Feature: undefined step snippets
// ---
func whichCosts(arg1 string, arg2 int) { }
func godogs(arg1 int) { }
func whichCosts(arg1 string, arg2 int) {
}
func godogs(arg1 int) {
}
ctx.Step(`^"([^"]*)", which costs £(\d+)$`, whichCosts)
ctx.Step(`^(\d+) godogs$`, godogs)
@ -164,9 +175,12 @@ Feature: undefined step snippets
// ---
func чтото() { }
func яДелаюЕщёЧтотоParam(param1 string, arg1, arg2 int, param2, параметр3, arg3, data string) { }
func получаетсяЕщёБолееЧтото() { }
func чтото() {
}
func яДелаюЕщёЧтотоParam(param1 string, arg1, arg2 int, param2, параметр3, arg3, data string) {
}
func получаетсяЕщёБолееЧтото() {
}
ctx.Step(`^что-то$`, чтото)
ctx.Step(`^я делаю ещё что-то "([^"]*)", (\d+), (\d+), param="([^"]*)", "([^"]*)", "([^"]*)", "([^"]*)"$`, яДелаюЕщёЧтотоParam)

Просмотреть файл

@ -28,7 +28,8 @@ var undefinedSnippetsTpl = template.Must(template.New("snippets").Funcs(snippetH
// ---
{{ range . }}func {{ .Method }}({{ .Args }}) { }
{{ range . }}func {{ .Method }}({{ .Args }}) {
}
{{end}}{{ range . }}
ctx.Step({{ backticked .Expr }}, {{ .Method }}){{end}}
`))