+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ The format is based on [Keep a Changelog][kac] and this project adheres to
* clarify docker usage (#741)
* update Arch Linux package URL in installation.rst (#821)
* rename bash-bats to bats for Arch Linux in installation.rst (#836)
* fix FAQ entry about setup-/teardown_suite, as they are available now (#861)

## [1.10.0] - 2023-07-15

Expand Down
4 changes: 4 additions & 0 deletions docs/list-links.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import pickle
with open("build/doctrees/environment.pickle", "rb") as f:
dat = pickle.load(f)
print(dat.domaindata['std']['labels'])
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
# ones.
extensions = [
'recommonmark',
'sphinxcontrib.programoutput'
'sphinxcontrib.programoutput',
'sphinx.ext.autosectionlabel'
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
4 changes: 3 additions & 1 deletion docs/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,6 @@ There is also `BATS_TEST_SKIPPED` which will be non-empty (contains the skip mes
How can I setup/cleanup before/after all tests?
-----------------------------------------------

Currently, this is not supported. Please contribute your usecase to issue `#39 <https://github.com/bats-core/bats-core/issues/39>`_.
Setup/cleanup before/after all tests can be achieved using the special `setup_suite` and `teardown_suite` functions.
These functions must be placed into a dedicated `setup_suite.bash` file next to your `.bats` files.
For more information check out the :ref:`setup and teardown section <setup and teardown: pre- and post-test hooks>`.
4 changes: 2 additions & 2 deletions docs/source/warnings/BW02.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Using a feature that is only available starting with a certain version can be a
In most cases, running this code in older versions will generate an error due to a missing command.
However, in cases like `run`'s where old version simply take all parameters as command to execute, the failure can be silent.

How to fix
----------
How to fix BW02
---------------

When you encounter this warning, you can simply guard your code with `bats_require_minimum_version <version>` as the message says.
For example, consider the following code:
Expand Down
4 changes: 2 additions & 2 deletions docs/source/warnings/BW03.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ BW03: `setup_suite` is visible to test file '<path>', but was not executed. It b
In contrast to the other setup functions, `setup_suite` must not be defined in `*.bats` files but in `setup_suite.bash`.
When a file is executed and sees `setup_suite` defined but not run before the tests, this warning will be printed.

How to fix
----------
How to fix BW03
---------------

The fix depends on your actual intention. There are basically two cases:

Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载