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 Bash IDE with support for $BATS_RUN_COMMAND – try it now!
© 2020–2022 Joachim Ansorg
Imprint
Privacy Policy
Legal