mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
bats: add page (#12326)
* bats: add page --------- Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com> Co-authored-by: Seth Falco <seth@falco.fun> Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
This commit is contained in:
parent
653f08a81a
commit
5b425e8b0c
1 changed files with 20 additions and 0 deletions
20
pages/common/bats.md
Normal file
20
pages/common/bats.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# bats
|
||||||
|
|
||||||
|
> 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>.
|
||||||
|
|
||||||
|
- Run a BATS test script and output results in the TAP (Test Anything Protocol) format:
|
||||||
|
|
||||||
|
`bats --tap {{path/to/test.bats}}`
|
||||||
|
|
||||||
|
- Count test cases of a test script without running any tests:
|
||||||
|
|
||||||
|
`bats --count {{path/to/test.bats}}`
|
||||||
|
|
||||||
|
- Run BATS test cases contained in a directory and its subdirectories (files with a `.bats` extension):
|
||||||
|
|
||||||
|
`bats --recursive {{path/to/directory}}`
|
||||||
|
|
||||||
|
- Output results in a specific format:
|
||||||
|
|
||||||
|
`bats --formatter {{pretty|tap|junit}} {{path/to/test.bats}}`
|
Loading…
Add table
Reference in a new issue