helper: test non-existent helpers
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
@@ -85,6 +85,11 @@ func InternalReplaceExecCommand(t *testing.T) {
|
||||
|
||||
// replace execCommand to have the resulting *exec.Cmd launch TestHelperChildStub
|
||||
execCommand = func(name string, arg ...string) *exec.Cmd {
|
||||
// pass through nonexistent path
|
||||
if name == "/nonexistent" && len(arg) == 0 {
|
||||
return exec.Command(name)
|
||||
}
|
||||
|
||||
return exec.Command(os.Args[0], append([]string{"-test.run=TestHelperChildStub", "--", name}, arg...)...)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user