1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
// +build windows solaris
package reap
import (
"runtime"
"testing"
)
func TestReap_IsSupported(t *testing.T) {
if IsSupported() {
t.Fatalf("reap should not be supported on %s", runtime.GOOS)
}
}
func TestReap_ReapChildren(t *testing.T) {
pids := make(PidCh, 1)
errors := make(ErrorCh, 1)
ReapChildren(pids, errors, nil, nil)
select {
case <-pids:
t.Fatalf("should not report any pids")
case <-errors:
t.Fatalf("should not report any errors")
default:
}
}
|