Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Test your shell scripts!
Shell Makefile

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
shpec
.travis.yml
LICENSE.txt
Makefile
README.md
VERSION
install.sh

README.md

shpec Build Status

Test your shell scripts!

Screenshot of shpec

Using shpec

This repo itself is using shpec, so feel free to use it as an example. Here is the basic structure that you'll want:

└── shpec
    └── an_example_shpec.sh
    └── another_shpec.sh

Then to run your tests:

shpec [shpec_files]

Examples

shpec's own tests are a great place to start. More detailed examples to come.

Matchers

The general format is:

assert matcher arguments

where matcher is one of the following:

Binary Matchers

equal         # equality
unequal       # inequality
gt            # algebraic '>'
lt            # algebraic '<'
match         # regex match

Unary Matchers

present       # string presence
blank         # string absence
file_present  # file presence
file_absent   # file absence
symlink       # tests a symlink's target
test          # evaluates a test string

Support for custom matchers coming soon.

Installation

sh -c "`curl https://raw.github.com/shpec/shpec/master/install.sh`"

Contributing

Pull requests are always welcome.

Something went wrong with that request. Please try again.