From a50c81837b630cb92853a638f5d6503b1dfcda0c Mon Sep 17 00:00:00 2001 From: Aofei Sheng Date: Mon, 15 Jul 2024 19:27:29 +0800 Subject: [PATCH] test: make cmd/TestInstallInNonGitRepo not affected by actual major.minor versions --- cmd/make_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/make_test.go b/cmd/make_test.go index e35345667..dd141b78b 100644 --- a/cmd/make_test.go +++ b/cmd/make_test.go @@ -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 ( @@ -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)