Skip to content
/ expect Public

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.

Notifications You must be signed in to change notification settings

minond/expect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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