Execute arguments as command
Runs the arguments as a command and then stores output and exit status into special global variables.
It returns with status code 0
to help making assertions in your test case.
Usage
-0 to -255 | Expect that the command exits with the given exit status. |
! | Expect that the command exits with a non-zero exit status. |
--keep-empty-lines | Keep empty lines in ${lines[0]} . |
--separate-stderr | Store STDOUT in $output and STDERR in $stderr . Lines are stored in $lines and $stderr_lines . |
Links
Examples
- Executing a command with
run
1 2 3
@test "executing a command with run" { run -0 command -v bash }
BashSupport Pro ist eine Shell-Skript-IDE mit Unterstützung für run von bats-core - probieren Sie es jetzt aus!