返回 DeepSeek-Reasonix
sandbox_test.go
根目录 / internal / config / sandbox_test.go
1 package config
2
3 import "testing"
4
5 func TestBashModeWindowsAlwaysOff(t *testing.T) {
6 cfg := Default()
7 if got := cfg.BashModeForGOOS("windows"); got != "off" {
8 t.Fatalf("empty Windows bash mode = %q, want off", got)
9 }
10
11 cfg.Sandbox.Bash = "enforce"
12 if got := cfg.BashModeForGOOS("windows"); got != "off" {
13 t.Fatalf("explicit Windows bash mode = %q, want off", got)
14 }
15
16 cfg.Sandbox.Bash = ""
17 if got := cfg.BashModeForGOOS("darwin"); got != "enforce" {
18 t.Fatalf("empty Darwin bash mode = %q, want enforce", got)
19 }
20 }
21
21 lines GO