Skip to content

Commit

Permalink
Merge pull request #1937 from aofei/make_test
Browse files Browse the repository at this point in the history
test: make cmd/TestInstallInNonGitRepo not affected by actual major.minor versions
  • Loading branch information
xushiwei authored Jul 15, 2024
2 parents 9ff7b67 + a50c818 commit 6e06287
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/make_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ package make_test
import (
"bytes"
"errors"
"fmt"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"testing"

"github.com/goplus/gop/env"
)

const (
Expand Down Expand Up @@ -307,7 +310,7 @@ func TestInstallInNonGitRepo(t *testing.T) {
})

t.Run("install with VERSION file", func(t *testing.T) {
version := "v1.3.98"
version := fmt.Sprintf("v%s.65535", env.MainVersion)
// Create VERSION file
if err := os.WriteFile(versionFile, []byte(version), 0644); err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 6e06287

Please sign in to comment.