Skip to content

Unit testing framework for bash scripts

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
LICENSE.md
Notifications You must be signed in to change notification settings

neopragma/bash-spec

Repository files navigation

Unit test framework for bash

Unit test framework using a BDD style syntax.

  • bash_spec - source this file at the top of your test script.
  • test_spec - unit tests for bash_spec.

Samples

  • fizzbuzz-bash - sample 'application' to illustrate unit testing.
  • fizzbuzz-test - sample test script for fizzbuzz-korn.
  • phone-bash - sample 'application' to illustrate unit testing.
  • phone-test - sample test script for phone-korn.
  • install-test - simple validation that packages are installed and have the expected permissions.

Install

curl -O https://raw.githubusercontent.com/neopragma/bash-spec/master/bash_spec

Note the project name has a dash while the script itself has an underscore (for your amusement and convenience).

Convenience

Add pwd to PATH:

. ./envvars

Wrapper script to run tests:

run install-test
run all

About

Unit testing framework for bash scripts

Resources

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages