bats_require_minimum_version “minimum version”

Instructs bats-core to verify its library version. The test will fail if the version is lower than the required minimum version.

bats_require_minimum_version is required to enable enhancements of run and other commands, which were added in later versions of bats-core.

Usage

1st argument
(required)
The minimum required version, e.g. “1.5.0”

Examples

Require bats-core 1.5.0 or later:
1
2
3
4
@test "my test" {
  bats_require_minimum_version 1.5.0
  run --separate-stderr some-command
}
BashSupport Pro is a shell script IDE with support for bats-core’s bats_require_minimum_versiontry it now!
© 2020–2024 Joachim Ansorg
Imprint
Privacy Policy
Legal