Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding
expansion.bzl
for Improved Env Var Expansion
* Adding `expansion.bzl` directly to this project. * Allows for better environment variable expansion than built-in skylark methods. * I'm also trying to submit this to Skylib (bazelbuild/bazel-skylib#486). * I could add this here (instead or in addition to). * Obviously, (also) adding this to Skylib would be more reusable for more repos. * Once submitted to Skylib (if accepted), this addition of `expansion.bzl` could be replaced with referencing the one in Skylib. * Doing this would add an extra dependency for bazel-bats (needing to pull in Skylib in `bazel_bats_dependencies()`). * Alternatively, could just keep this file here (for no extra dependency). * Updating `env` attribute expansion logic in `_bats_test_impl()`. * Allows better environment expansion logic than previously used. * Updating `tests/hello_world.bats` to validate many different environment variable expansion configurations. This is one approach for improving `bats_test` environment variable expansion logic (to get at least parity with built-in expansion logic). See https://github.com/CauhxMilloy/bazel-bats/tree/improvedExpansionWithShTest for `sh_test` approach.
- Loading branch information