Files
Reims-Go/internal/control/control_test.go
T

17 lines
380 B
Go

package control
import (
"strings"
"testing"
)
func TestPipeNameIncludesInstallationAndUserScope(t *testing.T) {
name := PipeName()
if !strings.HasPrefix(name, `\\.\pipe\reims-go-control-`) {
t.Fatalf("unexpected named pipe path %q", name)
}
if !strings.HasSuffix(name, "-"+currentUserScope()) {
t.Fatalf("named pipe is not scoped to the current user: %q", name)
}
}