17 lines
353 B
Go
17 lines
353 B
Go
//go:build windows
|
|
|
|
package platform
|
|
|
|
import (
|
|
"os/exec"
|
|
"testing"
|
|
)
|
|
|
|
func TestConfigureHidden(t *testing.T) {
|
|
c := exec.Command("cmd.exe", "/c", "exit", "0")
|
|
configureHidden(c)
|
|
if c.SysProcAttr == nil || !c.SysProcAttr.HideWindow || c.SysProcAttr.CreationFlags&0x08000000 == 0 {
|
|
t.Fatalf("hidden process flags missing: %#v", c.SysProcAttr)
|
|
}
|
|
}
|