Source file
src/os/exec_unix_test.go
1
2
3
4
5
6
7 package os_test
8
9 import (
10 "internal/testenv"
11 . "os"
12 "testing"
13 )
14
15 func TestErrProcessDone(t *testing.T) {
16 testenv.MustHaveGoBuild(t)
17 path, err := testenv.GoTool()
18 if err != nil {
19 t.Errorf("finding go tool: %v", err)
20 }
21 p, err := StartProcess(path, []string{"go"}, &ProcAttr{})
22 if err != nil {
23 t.Errorf("starting test process: %v", err)
24 }
25 p.Wait()
26 if got := p.Signal(Kill); got != ErrProcessDone {
27 t.Errorf("got %v want %v", got, ErrProcessDone)
28 }
29 }
30
View as plain text