mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 10:42:07 +02:00
bats: edit page (#13253)
Co-authored-by: spageektti <git@spageektti.cc>
This commit is contained in:
parent
bea05eb475
commit
5bb7f0a295
1 changed files with 13 additions and 5 deletions
|
@ -3,18 +3,26 @@
|
||||||
> Bash Automated Testing System: a TAP (<https://testanything.org/>) compliant testing framework for Bash.
|
> Bash Automated Testing System: a TAP (<https://testanything.org/>) compliant testing framework for Bash.
|
||||||
> More information: <https://bats-core.readthedocs.io/en/stable/usage.html>.
|
> More information: <https://bats-core.readthedocs.io/en/stable/usage.html>.
|
||||||
|
|
||||||
- Run a BATS test script and output results in the TAP (Test Anything Protocol) format:
|
- Run a BATS test script and output results in the [t]AP (Test Anything Protocol) format:
|
||||||
|
|
||||||
`bats --tap {{path/to/test.bats}}`
|
`bats --tap {{path/to/test.bats}}`
|
||||||
|
|
||||||
- Count test cases of a test script without running any tests:
|
- [c]ount test cases of a test script without running any tests:
|
||||||
|
|
||||||
`bats --count {{path/to/test.bats}}`
|
`bats --count {{path/to/test.bats}}`
|
||||||
|
|
||||||
- Run BATS test cases contained in a directory and its subdirectories (files with a `.bats` extension):
|
- Run BATS test cases [r]ecursively (files with a `.bats` extension):
|
||||||
|
|
||||||
`bats --recursive {{path/to/directory}}`
|
`bats --recursive {{path/to/directory}}`
|
||||||
|
|
||||||
- Output results in a specific format:
|
- Output results in a specific [F]ormat:
|
||||||
|
|
||||||
`bats --formatter {{pretty|tap|junit}} {{path/to/test.bats}}`
|
`bats --formatter {{pretty|tap|tap13|junit}} {{path/to/test.bats}}`
|
||||||
|
|
||||||
|
- Add [T]iming information to tests:
|
||||||
|
|
||||||
|
`bats --timing {{path/to/test.bats}}`
|
||||||
|
|
||||||
|
- Run specific number of [j]obs in parallel (requires GNU `parallel` to be installed):
|
||||||
|
|
||||||
|
`bats --jobs {{number}} {{path/to/test.bats}}`
|
||||||
|
|
Loading…
Add table
Reference in a new issue