#!/bin/bash

exec 2>&1

test_spin_usage() {
    local output="$(spin --bogus 2>&1 || true)"
    if ! echo "$output" | grep -q 'use: spin'; then
        fail "expected to find 'use: spin' in usage output"
    fi
}

test_nxt() {
    if ! spin -f 'X a' >/dev/null 2>&1; then
        fail "compiled without -DNXT"
    fi
}

# TODO more tests here

. shunit2

