Fixed package of scriptx

This commit is contained in:
Leon Mika 2026-08-08 10:28:01 +10:00
parent 74afda5110
commit 353b4277cf
6 changed files with 18 additions and 11 deletions

View file

@ -4,13 +4,13 @@ import (
"testing"
"github.com/bitfield/script"
"github.com/lmika/scriptx"
"lmika.dev/pkg/scriptx"
)
func TestSubPipe(t *testing.T) {
t.Run("should run the subpipe for each line in the parent pipe", func(t *testing.T) {
verifyPipeLines(t, func(p *script.Pipe) *script.Pipe {
return p.Filter(scriptx.SubPipe(func (line string) *script.Pipe {
return p.Filter(scriptx.SubPipe(func(line string) *script.Pipe {
return script.Echo(line).Replace("Line", "Subpipe")
}))
}, []string{
@ -23,4 +23,4 @@ func TestSubPipe(t *testing.T) {
"Subpipe 3",
})
})
}
}