https://github.com/limabd/batspp
Shell style tests using bats-core
https://github.com/limabd/batspp
bash linux testing
Last synced: about 1 year ago
JSON representation
Shell style tests using bats-core
- Host: GitHub
- URL: https://github.com/limabd/batspp
- Owner: LimaBD
- License: lgpl-3.0
- Created: 2022-05-22T06:59:15.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-04T21:02:34.000Z (about 2 years ago)
- Last Synced: 2025-03-22T23:51:15.632Z (over 1 year ago)
- Topics: bash, linux, testing
- Language: Python
- Homepage:
- Size: 400 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

[](https://github.com/LimaBD/batspp/blob/main/LICENSE.txt)
[](https://www.python.org/)

# BATSPP
Shell style tests using [bats-core framework](https://github.com/bats-core/bats-core)
Bats is a great [TAP](https://testanything.org/)-compliant testing framework for Bash. It provides a simple way to verify that the UNIX programs you write behave as expected.
The goal of Batspp to allow writing shell style tests with an simple and a less idiosyncratic syntax.
``` bash
#!/usr/bin/env batspp
# Test example with multiple assertions
$ filepath=$(echo $TMP/testfile-"$$")
$ echo -e "in this test\nwe are using\nmultiple assertions" | sudo tee $filepath
$ cat $filepath | wc -l
3
$ cat $filepath | wc -c
46
```
Batspp grew out of work for [Thomas O'Hara](https://github.com/tomasohara) on [shell-scripts](https://github.com/tomasohara/shell-scripts) and [mezcla](https://github.com/tomasohara/mezcla).
## Documentation
You can learn more about Batspp reading the [docs](https://batspp.readthedocs.io/en/latest/).
## License
Batspp is released under an GNU Lesser General Public License Version 3, see [LICENSE.TXT](./LICENSE.txt) for details.