(t *testing.T)
| 119 | } |
| 120 | |
| 121 | func TestExecutable(t *testing.T) { |
| 122 | for _, tt := range []struct { |
| 123 | process int |
| 124 | want string |
| 125 | }{ |
| 126 | {process: 26231, want: "/usr/bin/vim"}, |
| 127 | {process: 26232, want: ""}, |
| 128 | } { |
| 129 | p, err := getProcFixtures(t).Proc(tt.process) |
| 130 | if err != nil { |
| 131 | t.Fatal(err) |
| 132 | } |
| 133 | exe, err := p.Executable() |
| 134 | if err != nil { |
| 135 | t.Fatal(err) |
| 136 | } |
| 137 | if diff := cmp.Diff(tt.want, exe); diff != "" { |
| 138 | t.Fatalf("unexpected absolute path to exe (-want +got):\n%s", diff) |
| 139 | } |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | func TestCwd(t *testing.T) { |
| 144 | for _, tt := range []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…