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