$stderr
–
STDERR of The Last run
Command
$stderr
contains the output on STDERR of the last executed run command.
This variable is only available if run
was executed with --separate-stderr
.
Links
Examples
- Split output of
run
into STDOUT and STDERR 1 2 3 4 5 6 7 8 9 10
@test "Example" { # enable support for flags of the run command bats_require_minimum_version 1.5.0 # keep output on STDERR in $stderr and $stderr_lines run --separate-stderr cat nonexistent_filename echo "Status: $status" >&3 echo "Output: $stderr" >&3 echo "First line: ${stderr_lines[0]}" >&3 }
BashSupport Pro ist eine Shell-Skript-IDE mit Unterstützung für $stderr von bats-core - probieren Sie es jetzt aus!