Moved builder tests to a godog_test pkg

Этот коммит содержится в:
Fredrik Lönnblad 2020-05-22 13:56:20 +02:00
родитель 7568b291e4
коммит a1152ca1c9
4 изменённых файлов: 10 добавлений и 6 удалений

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

@ -1,7 +1,7 @@
// +build go1.12
// +build !go1.13
package godog
package godog_test
import (
"bytes"

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

@ -1,6 +1,6 @@
// +build go1.13
package godog
package godog_test
import (
"bytes"

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

@ -1,4 +1,4 @@
package godog
package godog_test
import (
"bytes"
@ -7,6 +7,8 @@ import (
"os/exec"
"path/filepath"
"testing"
"github.com/cucumber/godog"
)
func TestGodogBuildWithModuleOutsideGopathAndHavingOnlyFeature(t *testing.T) {
@ -35,7 +37,7 @@ func TestGodogBuildWithModuleOutsideGopathAndHavingOnlyFeature(t *testing.T) {
t.Fatal(err)
}
if out, err := exec.Command("go", "mod", "edit", "-require", fmt.Sprintf("github.com/cucumber/godog@%s", Version)).CombinedOutput(); err != nil {
if out, err := exec.Command("go", "mod", "edit", "-require", fmt.Sprintf("github.com/cucumber/godog@%s", godog.Version)).CombinedOutput(); err != nil {
t.Log(string(out))
t.Fatal(err)
}

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

@ -1,4 +1,4 @@
package godog
package godog_test
import (
"bytes"
@ -9,6 +9,8 @@ import (
"path/filepath"
"strings"
"testing"
"github.com/cucumber/godog"
)
var builderFeatureFile = `Feature: eat godogs
@ -137,7 +139,7 @@ func buildTestCommand(t *testing.T, args ...string) *exec.Cmd {
if build.Default.GOOS == "windows" {
bin += ".exe"
}
if err = Build(bin); err != nil {
if err = godog.Build(bin); err != nil {
t.Fatal(err)
}