This Will Pass

This test checks roundup runs and fails with the expected output.

#!/usr/bin/env roundup

A quick note

For more information on how roundup views a test-plan, see roundup(5) or the roundup(5) test.

Let's get started


Prevent carpel tunnel

rup() { /bin/sh $0 $ ; }

The Plan

describe the plan meaningfully.

describe "roundup(1) testing roundup(5)"

it_displays_the_title() {
    first_line=$(rup roundup-5 | head -n 1)
    test "$first_line" "=" "roundup(5)"

it_exists_non_zero() {
    status=$(set +e ; rup roundup-5 >/dev/null ; echo $?)
    test 2 -eq $status

it_survives_edge_cases() {
    rup edge