package subprocesslaunch

import "testing"

func TestNewLeavesCreationFlagsUnset(t *testing.T) {
	cmd := New(`C:\Program Files\Mirage\MirageGUI.exe`, []string{"/subproc"})

	if got, want := cmd.Path, `C:\Program Files\Mirage\MirageGUI.exe`; got != want {
		t.Fatalf("cmd.Path = %q, want %q", got, want)
	}
	if got, want := len(cmd.Args), 2; got != want {
		t.Fatalf("len(cmd.Args) = %d, want %d", got, want)
	}
	if got, want := cmd.Args[1], "/subproc"; got != want {
		t.Fatalf("cmd.Args[1] = %q, want %q", got, want)
	}
	if cmd.SysProcAttr != nil {
		t.Fatalf("cmd.SysProcAttr = %#v, want nil", cmd.SysProcAttr)
	}
}
