Adds a `bats.withLibraries (p: [ ... ])` function, which creates a
`bats` wrapper where the `BATS_LIB_PATH` environment variable contains
fallbacks for the given list of libraries.
This allows to e.g. use the `bats-assert` library (which itself requires the
`bats-support` library) with
bats.withLibraries (p: [ p.bats-support p.bats-assert ])
In a `.bats` file you can then call `bats_load_library` [1] to load the
libraries in the `setup()` function:
setup() {
bats_load_library bats-support
bats_load_library bats-assert
}
[1]: https://bats-core.readthedocs.io/en/stable/writing-tests.html?highlight=library#bats-load-library-load-system-wide-libraries
I happily painted myself into a corner when converting bats to use
resholve. Since resholve tests itself with bats, all updates to
resholve now require rebuilding bats. The build itself is quick, but
the tests take a few minutes; moving them into passthru saves time. :)
The resholve 0.8.0 release includes better support for intra-package
references, making it possible to also resholve files in lib/libexec.
This process helped shake loose 5 more unnoticed package dependencies,
and enable bats' parallel execution support.