aboutsummaryrefslogtreecommitdiffhomepage
path: root/helper/pipe_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-02-13 23:15:34 +0900
committerOphestra <cat@gensokyo.uk>2025-02-13 23:34:15 +0900
commitfe7d208cf76fa6f24bb9d12ba29b5ed61d837ce3 (patch)
treecac02af50a13b2078739a8f5a74d219f3b60833d /helper/pipe_test.go
parent60c287375048b21eab2bd82f1e7d43e36dcfb3a2 (diff)
helper: use generic extra files interface
This replaces the pipes object and integrates context into helper process lifecycle. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'helper/pipe_test.go')
-rw-r--r--helper/pipe_test.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/helper/pipe_test.go b/helper/pipe_test.go
deleted file mode 100644
index e9c8d06b..00000000
--- a/helper/pipe_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package helper
-
-import (
- "testing"
-)
-
-func Test_pipes_pipe_mustClosePipes(t *testing.T) {
- p := new(pipes)
-
- t.Run("pipe without args", func(t *testing.T) {
- defer func() {
- wantPanic := "attempted to pipe without args"
- if r := recover(); r != wantPanic {
- t.Errorf("pipe() panic = %v, wantPanic %v",
- r, wantPanic)
- }
- }()
- _ = p.pipe()
- })
-
- p.args = MustNewCheckedArgs(make([]string, 0))
- t.Run("obtain pipes", func(t *testing.T) {
- if err := p.pipe(); err != nil {
- t.Errorf("pipe() error = %v",
- err)
- return
- }
- })
-
- t.Run("pipe twice", func(t *testing.T) {
- defer func() {
- wantPanic := "attempted to pipe twice"
- if r := recover(); r != wantPanic {
- t.Errorf("pipe() panic = %v, wantPanic %v",
- r, wantPanic)
- }
- }()
- _ = p.pipe()
- })
-
- p.mustClosePipes()
-}