mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-20 01:01:37 +00:00
Update cheatsheets
This commit is contained in:
25
tldr/bats
Normal file
25
tldr/bats
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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}}`
|
||||
Reference in New Issue
Block a user