// A nonempty line goes to cat and comes back on the App output. // The Lab tests the echo, an empty line and a child that never answers. graph echo : App { connector shell : Process { mode = job ; command = "cat" codec = lines idempotent = true; behavior = deterministic timeout = duration("5s") } operator relay { on in where data != "" { out = data } } in -> relay -> shell -> out shell.err -> nothing shell.exit -> nothing } lab smoke { mock shell { on in { out = . exit = Exited { exit_code = 0, signal = null } } } scenario roundtrip { app.in = "hello" expect app.out == "hello" expect shell.err == nothing } scenario filtered { app.in = "" expect shell.in == nothing expect app.out == nothing } scenario silence_expires { mock shell { on in { out = nothing } } app.in = "hello" advance duration("5s") expect shell.exit == TimeoutExpired {} } }