aboutsummaryrefslogtreecommitdiffhomepage
path: root/helper/export_test.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-09-29 15:22:35 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-09-29 15:22:35 +0900
commit7e7327ebf8ba6323e9ba3ba38b27ed87fc578568 (patch)
tree5ba1723800df6fedcde02d854ea96b4e0798dcca /helper/export_test.go
parent3bf456da6593708823a967c4d88e4b0a816179dd (diff)
helper: export internal stub functions for cross-package testing
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'helper/export_test.go')
-rw-r--r--helper/export_test.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/helper/export_test.go b/helper/export_test.go
deleted file mode 100644
index 6bf18ce3..00000000
--- a/helper/export_test.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package helper
-
-import (
- "os"
- "os/exec"
- "testing"
-)
-
-// replace execCommand to have the resulting *exec.Cmd launch TestHelperChildStub
-func ReplaceExecCommand(t *testing.T) {
- t.Cleanup(func() {
- execCommand = exec.Command
- })
-
- execCommand = func(name string, arg ...string) *exec.Cmd {
- return exec.Command(os.Args[0], append([]string{"-test.run=TestHelperChildStub", "--", name}, arg...)...)
- }
-}