$BATS_RUN_COMMAND  –  Last Used run Command

$BATS_RUN_COMMAND is the last executed run command used in your test case.

Examples

Print last run command
1
2
3
4
@test "Example" {
  run test
  echo "Last run command: $BATS_RUN_COMMAND" >&3
}
BashSupport Pro is a shell script IDE with support for bats-core’s $BATS_RUN_COMMANDtry it now!
© 2020–2024 Joachim Ansorg
Imprint
Privacy Policy
Legal