Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Nitrux/tbd

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

- '<cmd> [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:

- '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."'
Morty Proxy This is a proxified and sanitized view of the page, visit original site.