Parent Directory of The Test File

$BATS_TEST_DIRNAME is the path to the directory containing the current bats test file

Examples

Print parent directory path :

1
2
3
@test "Example" {
  echo "Parent: $BATS_TEST_DIRNAME" >&3
}
BashSupport Pro is a Bash IDE with support for $BATS_TEST_DIRNAME – try it now!
© 2020–2022 Joachim Ansorg
Imprint
Privacy Policy
Legal