blob: 1f032b3b4879aaa1e6ffbaf9583ccdfc77fe060a [file] [log] [blame]
cue cmd print
cmp stdout expect-stdout
-- expect-stdout --
t.1.
.t.2.
-- task_tool.cue --
package home
import (
"tool/exec"
"tool/cli"
"strings"
)
command: print: {
task: {
t1: exec.Run & {
cmd: ["sh", "-c", "sleep 1; echo t1"]
stdout: string
}
t2: exec.Run & {
cmd: ["sh", "-c", "sleep 1; echo t2"]
stdout: string
}
t3: cli.Print & {
text: (f & {arg: t1.stdout + t2.stdout}).result
}
}
}
f :: {
arg: string
result: strings.Join(strings.Split(arg, ""), ".")
}
-- task.cue --
package home
-- cue.mod --