bats_pipe command0 | command1

Paired with run, the bats_pipe help function allows testing command pipelines. For this function, the pipeline separator is \\| and not |.

Usage

-<N>Return the exit code from the th command in the chain of piped commands, instead of default behavior of “the last non-zero status”.

Examples

Executing a command with run and bats_pipe
1
2
3
@test "executing pipeline with commands a and b with run and bats_pipe" {
    run bats_pipe a \| b
}
BashSupport Pro ist eine Shell-Skript-IDE mit Unterstützung für bats_pipe von bats-core - probieren Sie es jetzt aus!
© 2020–2024 Joachim Ansorg
Impressum
Datenschutz
Rechtliches