| 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 |