2026-03-09 11:42:51 +00:00
|
|
|
package devenv
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"testing"
|
|
|
|
|
|
2026-03-26 15:12:11 +00:00
|
|
|
"dappco.re/go/core/container/internal/coreutil"
|
2026-03-22 01:55:36 +00:00
|
|
|
"dappco.re/go/core/io"
|
2026-03-09 11:42:51 +00:00
|
|
|
)
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestDetectTestCommand_ComposerJSON_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "composer.json"), `{"scripts":{"test":"pest"}}`)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cmd := DetectTestCommand(io.Local, tmpDir)
|
|
|
|
|
if cmd != "composer test" {
|
|
|
|
|
t.Errorf("expected 'composer test', got %q", cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestDetectTestCommand_PackageJSON_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "package.json"), `{"scripts":{"test":"vitest"}}`)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cmd := DetectTestCommand(io.Local, tmpDir)
|
|
|
|
|
if cmd != "npm test" {
|
|
|
|
|
t.Errorf("expected 'npm test', got %q", cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestDetectTestCommand_GoMod_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "go.mod"), "module example")
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cmd := DetectTestCommand(io.Local, tmpDir)
|
|
|
|
|
if cmd != "go test ./..." {
|
|
|
|
|
t.Errorf("expected 'go test ./...', got %q", cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestDetectTestCommand_CoreTestYaml_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
coreDir := coreutil.JoinPath(tmpDir, ".core")
|
|
|
|
|
_ = io.Local.EnsureDir(coreDir)
|
|
|
|
|
_ = io.Local.Write(coreutil.JoinPath(coreDir, "test.yaml"), "command: custom-test")
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cmd := DetectTestCommand(io.Local, tmpDir)
|
|
|
|
|
if cmd != "custom-test" {
|
|
|
|
|
t.Errorf("expected 'custom-test', got %q", cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestDetectTestCommand_Pytest_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "pytest.ini"), "[pytest]")
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cmd := DetectTestCommand(io.Local, tmpDir)
|
|
|
|
|
if cmd != "pytest" {
|
|
|
|
|
t.Errorf("expected 'pytest', got %q", cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestDetectTestCommand_Taskfile_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "Taskfile.yaml"), "version: '3'")
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cmd := DetectTestCommand(io.Local, tmpDir)
|
|
|
|
|
if cmd != "task test" {
|
|
|
|
|
t.Errorf("expected 'task test', got %q", cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestDetectTestCommand_NoFiles_Bad(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
|
|
|
|
|
|
|
|
|
cmd := DetectTestCommand(io.Local, tmpDir)
|
|
|
|
|
if cmd != "" {
|
|
|
|
|
t.Errorf("expected empty string, got %q", cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestDetectTestCommand_Priority_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
// .core/test.yaml should take priority over other detection methods
|
|
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
coreDir := coreutil.JoinPath(tmpDir, ".core")
|
|
|
|
|
_ = io.Local.EnsureDir(coreDir)
|
|
|
|
|
_ = io.Local.Write(coreutil.JoinPath(coreDir, "test.yaml"), "command: my-custom-test")
|
|
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "go.mod"), "module example")
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cmd := DetectTestCommand(io.Local, tmpDir)
|
|
|
|
|
if cmd != "my-custom-test" {
|
|
|
|
|
t.Errorf("expected 'my-custom-test' (from .core/test.yaml), got %q", cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestTest_LoadTestConfig_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
coreDir := coreutil.JoinPath(tmpDir, ".core")
|
|
|
|
|
_ = io.Local.EnsureDir(coreDir)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
configYAML := `version: 1
|
|
|
|
|
command: default-test
|
|
|
|
|
commands:
|
|
|
|
|
- name: unit
|
|
|
|
|
run: go test ./...
|
|
|
|
|
- name: integration
|
|
|
|
|
run: go test -tags=integration ./...
|
|
|
|
|
env:
|
|
|
|
|
CI: "true"
|
|
|
|
|
`
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(coreDir, "test.yaml"), configYAML)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cfg, err := LoadTestConfig(io.Local, tmpDir)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("unexpected error: %v", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if cfg.Version != 1 {
|
|
|
|
|
t.Errorf("expected version 1, got %d", cfg.Version)
|
|
|
|
|
}
|
|
|
|
|
if cfg.Command != "default-test" {
|
|
|
|
|
t.Errorf("expected command 'default-test', got %q", cfg.Command)
|
|
|
|
|
}
|
|
|
|
|
if len(cfg.Commands) != 2 {
|
|
|
|
|
t.Errorf("expected 2 commands, got %d", len(cfg.Commands))
|
|
|
|
|
}
|
|
|
|
|
if cfg.Commands[0].Name != "unit" {
|
|
|
|
|
t.Errorf("expected first command name 'unit', got %q", cfg.Commands[0].Name)
|
|
|
|
|
}
|
|
|
|
|
if cfg.Env["CI"] != "true" {
|
|
|
|
|
t.Errorf("expected env CI='true', got %q", cfg.Env["CI"])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestLoadTestConfig_NotFound_Bad(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
|
|
|
|
|
|
|
|
|
_, err := LoadTestConfig(io.Local, tmpDir)
|
|
|
|
|
if err == nil {
|
|
|
|
|
t.Error("expected error for missing config, got nil")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestTest_HasPackageScript_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "package.json"), `{"scripts":{"test":"jest","build":"webpack"}}`)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
if !hasPackageScript(io.Local, tmpDir, "test") {
|
|
|
|
|
t.Error("expected to find 'test' script")
|
|
|
|
|
}
|
|
|
|
|
if !hasPackageScript(io.Local, tmpDir, "build") {
|
|
|
|
|
t.Error("expected to find 'build' script")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestHasPackageScript_MissingScript_Bad(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "package.json"), `{"scripts":{"build":"webpack"}}`)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
if hasPackageScript(io.Local, tmpDir, "test") {
|
|
|
|
|
t.Error("expected not to find 'test' script")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestTest_HasComposerScript_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "composer.json"), `{"scripts":{"test":"pest","post-install-cmd":"@php artisan migrate"}}`)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
if !hasComposerScript(io.Local, tmpDir, "test") {
|
|
|
|
|
t.Error("expected to find 'test' script")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestHasComposerScript_MissingScript_Bad(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "composer.json"), `{"scripts":{"build":"@php build.php"}}`)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
if hasComposerScript(io.Local, tmpDir, "test") {
|
|
|
|
|
t.Error("expected not to find 'test' script")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestTestConfig_Struct_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
cfg := &TestConfig{
|
|
|
|
|
Version: 2,
|
|
|
|
|
Command: "my-test",
|
|
|
|
|
Commands: []TestCommand{{Name: "unit", Run: "go test ./..."}},
|
|
|
|
|
Env: map[string]string{"CI": "true"},
|
|
|
|
|
}
|
|
|
|
|
if cfg.Version != 2 {
|
|
|
|
|
t.Errorf("expected version 2, got %d", cfg.Version)
|
|
|
|
|
}
|
|
|
|
|
if cfg.Command != "my-test" {
|
|
|
|
|
t.Errorf("expected command 'my-test', got %q", cfg.Command)
|
|
|
|
|
}
|
|
|
|
|
if len(cfg.Commands) != 1 {
|
|
|
|
|
t.Errorf("expected 1 command, got %d", len(cfg.Commands))
|
|
|
|
|
}
|
|
|
|
|
if cfg.Env["CI"] != "true" {
|
|
|
|
|
t.Errorf("expected CI=true, got %q", cfg.Env["CI"])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestTestCommand_Struct_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
cmd := TestCommand{
|
|
|
|
|
Name: "integration",
|
|
|
|
|
Run: "go test -tags=integration ./...",
|
|
|
|
|
}
|
|
|
|
|
if cmd.Name != "integration" {
|
|
|
|
|
t.Errorf("expected name 'integration', got %q", cmd.Name)
|
|
|
|
|
}
|
|
|
|
|
if cmd.Run != "go test -tags=integration ./..." {
|
|
|
|
|
t.Errorf("expected run command, got %q", cmd.Run)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestTestOptions_Struct_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
opts := TestOptions{
|
|
|
|
|
Name: "unit",
|
|
|
|
|
Command: []string{"go", "test", "-v"},
|
|
|
|
|
}
|
|
|
|
|
if opts.Name != "unit" {
|
|
|
|
|
t.Errorf("expected name 'unit', got %q", opts.Name)
|
|
|
|
|
}
|
|
|
|
|
if len(opts.Command) != 3 {
|
|
|
|
|
t.Errorf("expected 3 command parts, got %d", len(opts.Command))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestDetectTestCommand_TaskfileYml_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "Taskfile.yml"), "version: '3'")
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cmd := DetectTestCommand(io.Local, tmpDir)
|
|
|
|
|
if cmd != "task test" {
|
|
|
|
|
t.Errorf("expected 'task test', got %q", cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestDetectTestCommand_Pyproject_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "pyproject.toml"), "[tool.pytest]")
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cmd := DetectTestCommand(io.Local, tmpDir)
|
|
|
|
|
if cmd != "pytest" {
|
|
|
|
|
t.Errorf("expected 'pytest', got %q", cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestHasPackageScript_NoFile_Bad(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
|
|
|
|
|
|
|
|
|
if hasPackageScript(io.Local, tmpDir, "test") {
|
|
|
|
|
t.Error("expected false for missing package.json")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestHasPackageScript_InvalidJSON_Bad(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "package.json"), `invalid json`)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
if hasPackageScript(io.Local, tmpDir, "test") {
|
|
|
|
|
t.Error("expected false for invalid JSON")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestHasPackageScript_NoScripts_Bad(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "package.json"), `{"name":"test"}`)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
if hasPackageScript(io.Local, tmpDir, "test") {
|
|
|
|
|
t.Error("expected false for missing scripts section")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestHasComposerScript_NoFile_Bad(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
|
|
|
|
|
|
|
|
|
if hasComposerScript(io.Local, tmpDir, "test") {
|
|
|
|
|
t.Error("expected false for missing composer.json")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestHasComposerScript_InvalidJSON_Bad(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "composer.json"), `invalid json`)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
if hasComposerScript(io.Local, tmpDir, "test") {
|
|
|
|
|
t.Error("expected false for invalid JSON")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestHasComposerScript_NoScripts_Bad(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "composer.json"), `{"name":"test/pkg"}`)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
if hasComposerScript(io.Local, tmpDir, "test") {
|
|
|
|
|
t.Error("expected false for missing scripts section")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestLoadTestConfig_InvalidYAML_Bad(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
coreDir := coreutil.JoinPath(tmpDir, ".core")
|
|
|
|
|
_ = io.Local.EnsureDir(coreDir)
|
|
|
|
|
_ = io.Local.Write(coreutil.JoinPath(coreDir, "test.yaml"), "invalid: yaml: :")
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
_, err := LoadTestConfig(io.Local, tmpDir)
|
|
|
|
|
if err == nil {
|
|
|
|
|
t.Error("expected error for invalid YAML")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestLoadTestConfig_MinimalConfig_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
2026-03-26 15:12:11 +00:00
|
|
|
coreDir := coreutil.JoinPath(tmpDir, ".core")
|
|
|
|
|
_ = io.Local.EnsureDir(coreDir)
|
|
|
|
|
_ = io.Local.Write(coreutil.JoinPath(coreDir, "test.yaml"), "version: 1")
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cfg, err := LoadTestConfig(io.Local, tmpDir)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("unexpected error: %v", err)
|
|
|
|
|
}
|
|
|
|
|
if cfg.Version != 1 {
|
|
|
|
|
t.Errorf("expected version 1, got %d", cfg.Version)
|
|
|
|
|
}
|
|
|
|
|
if cfg.Command != "" {
|
|
|
|
|
t.Errorf("expected empty command, got %q", cfg.Command)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestDetectTestCommand_ComposerWithoutScript_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
|
|
|
|
// composer.json without test script should not return composer test
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "composer.json"), `{"name":"test/pkg"}`)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cmd := DetectTestCommand(io.Local, tmpDir)
|
|
|
|
|
// Falls through to empty (no match)
|
|
|
|
|
if cmd != "" {
|
|
|
|
|
t.Errorf("expected empty string, got %q", cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 17:18:44 +00:00
|
|
|
func TestDetectTestCommand_PackageJSONWithoutScript_Good(t *testing.T) {
|
2026-03-09 11:42:51 +00:00
|
|
|
tmpDir := t.TempDir()
|
|
|
|
|
// package.json without test or dev script
|
2026-03-26 15:12:11 +00:00
|
|
|
_ = io.Local.Write(coreutil.JoinPath(tmpDir, "package.json"), `{"name":"test"}`)
|
2026-03-09 11:42:51 +00:00
|
|
|
|
|
|
|
|
cmd := DetectTestCommand(io.Local, tmpDir)
|
|
|
|
|
// Falls through to empty
|
|
|
|
|
if cmd != "" {
|
|
|
|
|
t.Errorf("expected empty string, got %q", cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|