24 lines
566 B
Go
24 lines
566 B
Go
|
|
//go:build !windows
|
||
|
|
|
||
|
|
package transport
|
||
|
|
|
||
|
|
import (
|
||
|
|
"errors"
|
||
|
|
"testing"
|
||
|
|
"time"
|
||
|
|
)
|
||
|
|
|
||
|
|
func TestDialNamedPipeUnsupportedOnNonWindows(t *testing.T) {
|
||
|
|
_, err := DialTimeout("npipe", "notify-demo", time.Millisecond)
|
||
|
|
if !errors.Is(err, ErrNamedPipeUnsupported) {
|
||
|
|
t.Fatalf("DialTimeout error = %v, want %v", err, ErrNamedPipeUnsupported)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func TestListenNamedPipeUnsupportedOnNonWindows(t *testing.T) {
|
||
|
|
_, err := Listen("npipe", "notify-demo")
|
||
|
|
if !errors.Is(err, ErrNamedPipeUnsupported) {
|
||
|
|
t.Fatalf("Listen error = %v, want %v", err, ErrNamedPipeUnsupported)
|
||
|
|
}
|
||
|
|
}
|