@@ -6,13 +6,11 @@ import (
66 "slices"
77 "testing"
88
9- "github.com/go-nv/goenv/internal/utils"
10-
119 "github.com/go-nv/goenv/internal/cmdtest"
1210 "github.com/go-nv/goenv/internal/config"
1311 "github.com/go-nv/goenv/internal/manager"
1412 toolspkg "github.com/go-nv/goenv/internal/tools"
15- "github.com/go-nv/goenv/testing/testutil "
13+ "github.com/go-nv/goenv/internal/utils "
1614)
1715
1816func TestStatusCommand_NoVersions (t * testing.T ) {
@@ -255,14 +253,8 @@ func TestStatusCommand_EmptyTools(t *testing.T) {
255253 // Create versions but no tools
256254 versions := []string {"1.21.0" , "1.22.0" , "1.23.0" }
257255 for _ , v := range versions {
258- versionPath := filepath .Join (tmpDir , "versions" , v )
259- // Create Go binary (required by ListInstalledVersions)
260- goBinDir := filepath .Join (versionPath , "bin" )
261- if err := utils .EnsureDirWithContext (goBinDir , "create test directory" ); err != nil {
262- t .Fatal (err )
263- }
264- goBin := filepath .Join (goBinDir , "go" )
265- testutil .WriteTestFile (t , goBin , []byte ("#!/bin/sh\n echo go version" ), utils .PermFileExecutable )
256+ // Create Go binary using helper (handles .bat on Windows)
257+ cmdtest .CreateTestBinary (t , tmpDir , v , "go" )
266258 }
267259
268260 mgr := manager .NewManager (cfg )
0 commit comments