Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
eliminate bugs and weeds from shell scripts
Shell Makefile
tag: v0.0.5

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
AUTHORS
COPYING
INSTALLING
Makefile
Pages.mk
README
configure
edge-test.sh
index.html
roundup-1-test.sh
roundup-5-test.sh
roundup.1.ronn
roundup.5.ronn
roundup.sh

README

roundup - kills shell eating bugs and weeds

roundup(1) is a unit testing tool for running roundup(5) test plans which are
written in any POSIX shell.  Each test in a plan is run in it's own isolated
sandbox.  A test can pass, be ignored, or fail.  Failed tests output their `set
-x` trace.

Example:

  my-test.sh:

    #!/bin/sh

    describe "head(1)"

    lines() {
    cat <<LINES
    first line
    second line
    LINES
    }

    it_displays_the_first_n_lines() {
      result=$(lines | head -n1)
      test "first line" "=" "$result"
    }

    # silly test to prove failures are recognized
    it_displays_n_lines_from_the_tail() {
      result=$(lines | head -n"-1")
      test "second line" "=" "$result"
    }

  run:

    $ roundup my-test.sh
    head(1)
      it_displays_the_first_n_lines:     [PASS]
      it_displays_n_lines_from_the_tail: [FAIL]
        ! ++ lines
        ! ++ cat
        ! ++ head -n-1
        ! head: illegal line count -- -1
        ! + result=
    ==========================================
    Tests:     2 | Passed:    1 | Failed:    1

More information and examples:
  http://bmizerany.github.com/roundup
Something went wrong with that request. Please try again.