//go:build windows

package daemon

import (
	"context"
	"testing"
)

func TestServiceCommandContextKeepsWindowsHelpersHeadless(t *testing.T) {
	cmd := serviceCommandContext(context.Background(), "powershell.exe")

	if cmd.SysProcAttr == nil {
		t.Fatal("expected Windows process attributes")
	}
	if !cmd.SysProcAttr.HideWindow {
		t.Fatal("expected helper window to be hidden")
	}
	if cmd.SysProcAttr.CreationFlags&windowsCreateNoWindow == 0 {
		t.Fatalf("expected CREATE_NO_WINDOW flag, got %#x", cmd.SysProcAttr.CreationFlags)
	}
}
