Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nitrux/tbd
Tests your programs.
https://github.com/nitrux/tbd
bash bdd bdd-framework shell shell-script shell-scripting shell-scripts tbd tdd tdd-framework zsh
Last synced: about 2 months ago
JSON representation
Tests your programs.
- Host: GitHub
- URL: https://github.com/nitrux/tbd
- Owner: Nitrux
- License: bsd-2-clause
- Created: 2020-10-27T04:31:40.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-31T23:50:32.000Z (over 1 year ago)
- Last Synced: 2024-11-11T08:15:36.651Z (2 months ago)
- Topics: bash, bdd, bdd-framework, shell, shell-script, shell-scripting, shell-scripts, tbd, tdd, tdd-framework, zsh
- Language: Shell
- Homepage:
- Size: 37.1 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# tbd
> _Test your programs._
A simple program for testing programs, with minimal syntax.
It runs atop `bash`, so you can use all of it.## Usage.
Write your tests in a file called `testfile` and run `tbd` in
the same directory where your `testfile` is.```
$ pwd
/home/me/dev/tbd
$ ls
LICENSE README.md tbd testfile
$ tbd
- true
- false
^ fail ($? = 1).
- return 4
^ fail ($? = 4).
- echo okay
- echo your home is at /home/me.
````tbd` exports just one function: `-`, which runs a test:
```
- ' [args]'
```By default, `tbd` will continue running tests when it finds an error.
If want it to abort on error, just set the variable `TBD_ERREXIT`
to any non-empty value.This is how a real `testfile` could look like:
```shell
- 'echo "Hi there!"'
- 'false' # This error will not result in abortion.TBD_ERREXIT=1 # Errors will now result on abortion.
- 'false' # tbd exits.
- 'echo "This will not be printed."'
```