Skip to content

Bash unit tests with TAP output. Do you have shell commands you want to write automated tests for? This tool gives you an assert method that you can use to describe and test your code.

minond/expect

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Build Status

expect - a simple test method for bash scripts with valid TAP v13 output

install

clone this repo and run make install (you may need to sudo that)

example

here's an example test file. let's say you named it under test/random_tests:

expect "the file to exist" $(test -f Makefile)
expect "the file to not exist" $(test ! -f Makefile.win)
expect "this to exit with 0" $(exit 0)
expect "output to do something" $(echo hi)

running tests

to run the above example, just execute expect test/random_tests

output

default output is not TAP. to get tap output pass a -o tap argument when running your tests: expect test/random_tests -o tap

About

Bash unit tests with TAP output. Do you have shell commands you want to write automated tests for? This tool gives you an assert method that you can use to describe and test your code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published