Releases: bats-core/bats-core
Releases · bats-core/bats-core
v1.12.0
Added :
bats::on_failurehook that gets called when a test orsetup*function fails (#1031)
Fixed:
- increase compatibility with Solaris (#1043)
- fix
noclobberbreakingbats-gather-tests(#1042) - fix exiting with
0despitebats:focuswhen all tests have been filtered out (#1058) - remove deprecated ubuntu 20.04 from CI config (#1083)
Documentation:
v1.11.1
Added:
- make Dockerfile compatible with
#!/bin/bashfiles (#967)
Documentation
- document
bats_pipefunction (#901)
Fixed:
- unbreak test suites with multiple files loading common constants (#904), introduced in v1.11.0
- docker image won't crash if a file or directory named 'bats' exists (#920)
- use $BATS_LIBDIR instead of hardcoded lib in 'bats-gather-tests' (#985, #990)
Changed:
- update Docker image with the latest
bats-detikversion 1.3.2 (#1017) - cleanup: remove unused
$BATS_FILTER(#907)
Documentation
v1.11.0
Added:
- hardened CI scripts by using hashes instead of versions for actions and restricting permissions (#754, #770)
- add security.md (#762)
- add codespell CI checks (#720)
- dynamic test registration via
bats_test_function(#349) - add check that Bats is executed with Bash >= 3.2 (#873)
Fixed:
install.shnow works for deviatinglib/dirs (likelib32,lib64) (#487)- catch unset
BATS_TEST_SOURCEinlib/bats-core/tracing.bashso
set -u/set -o nounsetworks as expected (#827) - fix
--gather-test-outputs-infails on tests with multiple/(#789) - install does not create unused
/usr/share/batsanymore (#857) - ensure IFS is unchanged in
{setup,teardown}{_suite,_file,},@testand free code (#879) - junit formatter: remove ANSI Codes to avoid invalid XML character (#886)
Changed:
- update Docker image with the latest
bats-fileversion 0.4.0 (#780) - update Docker image with the latest
bats-detikversion 1.3.0 (#876)
Documentation
v1.11.0-RC2
v1.11.0-RC1
Due to the extensive changes necessary for the dynamic test registration, this is first released as a candidate for users to check if it works as intended.
Added
- hardened CI scripts by using hashes instead of versions for actions and restricting permissions (#754, #770)
- add security.md (#762)
- add codespell CI checks (#720)
- dynamic test registration via
bats_test_function(#349)
Fixed
install.shnow works for deviatinglib/dirs (likelib32,lib64) (#487)- catch unset
BATS_TEST_SOURCEinlib/bats-core/tracing.bashso
set -u/set -o nounsetworks as expected (#827) - fix
--gather-test-outputs-infails on tests with multiple/(#789)
Changed
- update Docker image with the latest
bats-fileversion 0.4.0 (#780) - update Docker image with the latest
bats-detikversion 1.2.1 (#810)
Documentation
v1.10.0
Added:
- add
${BATS_TEST_TAGS[@]}for querying the tags during a test (#705) - print tags on failing tests (#705)
- test for negative arguments to
--jobs(#693) - add tests for
--formatter cat(#710) - test coverage in CI (#718)
- Support for rush as alternative to GNU parallel (#729)
- add
bats_pipehelper function forrunthat executes\|as pipes (#663) - publish docker images to ghcr.io (additionally to Dockerhub) (#740)
Documentation:
- clarify use cases of
--formatter cat(#710)
Fixed:
- fix
runwith options overwriting the value ofi(#726, #727) - fix
${BATS_TEST_NAMES[@]}containing only--tagsinstead of test name since Bats v1.8.0 (#705) - fix
run --keep-empty-linescounting trailing\nas (empty) new line (#711) - fix short flag unpacker creating bogus command lines with valued flags (#732)
- fix formatter becoming confused with retries (#734)
- fix
--gather-test-outputs-infails on tests with/(#735) - fix overriding
datebreaks--timing(#736)
Documentation
v1.9.0
Added:
- add installation instructions for Debian, Fedora, Gentoo, and OpenSUSE (#659)
- add
--line-reference-formatto switch file/line references in stack traces (#665)comma_line(default):file.bats, line 1colon:file.bats:1uri:file:///path/to/file.bats:1custom: define your own formatter inbats_format_file_line_reference_custom
- add
bats:focustag to run only focused tests (#679) - add bats-support, bats-assert, bats-file and bats-detik to Dockerfile (#674)
Documentation:
- add
--helptext andmanpage content for--filter-tags(#679)
Fixed:
- explicitly check for GNU parallel (#691)
- wait for report-formatter to finish before ending
bats' execution,
to fix empty files with--report-fomatter junitunder Docker (#692)
Documentation
v1.8.2
v1.8.1
v1.8.0
Bats 1.8.0
Released: 2022-09-15
Added:
- using external formatters via
--formatter <absolute path>(also works for
--report-formatter) (#602) - running only tests that failed in the last run via
--filter-status failed(#483) - variable
BATS_TEST_RETRIESthat specifies how often a test should be
reattempted before it is considered failed (#618) - Docker tags
latest-no-faccessat2and<bats-version\>-no-faccessat2for
avoidingbash: bats: No such file or directoryondocker<20.10(or
runc<v1.0.0-rc93) (#622) BATS_TEST_TIMEOUTvariable to force a timeout on test (includingsetup()) (#491)- also print (nonempty)
$stderr(fromrun --separate-stderr) with
--print-output-on-failure(#631) # bats test_tags=<tag list>/# bats file_tags=<tag list>and
--filter-tags <tag list>for tagging tests for execution filters (#642)- warning BW03: inform about
setup_suitein wrong file (.batsinstead ofsetup_suite.bash) (#652)
Documentation
- update gotcha about negated statements: Recommend using
run !on Bats
versions >=1.5.0 (#593) - add documentation for
bats_require_minimum_version(#595) - improve documentation about
setup_suite(#652)
Fixed:
- added missing shebang (#597)
- remaining instances of
run -<N>being incorrectly documented asrun =<N>(#599) - allow
--gather-test-outputs-in <directory>to work with existing, empty
directories (#603)- also add
--clean-and-gather-test-outputs-in <directory>for improved UX
- also add
- double slashes in paths derived from TMPDIR on MacOS (#607)
- fix
loadinteardownmarking failed tests as not run (#612) - fix unset variable errors (with set -u) and add regression test (#621)
teardown_fileerrors don't swallowsetup_fileerrors anymore, the behavior
is more liketeardown's now (onlyreturn/last command can triggerteardown
errors) (#623)- upgraded from deprecated CI envs for MacOS (10 -> 11,12) and Ubuntu
(18.04 -> 22.04) (#630) - add
/usr/lib/batsas default value forBATS_LIB_PATH(#628) - fix unset variable in
bats-formatter-junitwhensetup_filefails (#632) - unify error behavior of
teardown/teardown_file/teardown_suitefunctions:
only fail via return code, not via ERREXIT (#633) - fix unbound variable errors with
set -uonsetup_suitefailures (#643) - fix
loadnot being available insetup_suite(#644) - fix RPM spec, add regression test (#648)
- fix handling of
IFSbyrun(#650) - only print
setup_suite's stderr on errors (#649)