blob: 4fb822a552fb07cd0b09456d30d73d0ca08232c6 [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: {
runs: t1: exec.Run & {
cmd: ["sh", "-c", "sleep 1; echo t1"]
stdout: string
}
runs: t2: exec.Run & {
cmd: ["sh", "-c", "sleep 1; echo t2"]
stdout: string
}
print: cli.Print & {
text: (f & {arg: runs.t1.stdout + runs.t2.stdout}).result
}
}
f :: {
arg: string
result: strings.Join(strings.Split(arg, ""), ".")
}
-- task.cue --
package home
-- cue.mod --