Files
2026-07-13 13:00:08 +08:00

21 lines
525 B
Go

package config
import "testing"
func TestBashModeWindowsAlwaysOff(t *testing.T) {
cfg := Default()
if got := cfg.BashModeForGOOS("windows"); got != "off" {
t.Fatalf("empty Windows bash mode = %q, want off", got)
}
cfg.Sandbox.Bash = "enforce"
if got := cfg.BashModeForGOOS("windows"); got != "off" {
t.Fatalf("explicit Windows bash mode = %q, want off", got)
}
cfg.Sandbox.Bash = ""
if got := cfg.BashModeForGOOS("darwin"); got != "enforce" {
t.Fatalf("empty Darwin bash mode = %q, want enforce", got)
}
}