#/bin/sh

exec 2>&1

set -e

ROLO=${ROLO:-rolo}

test_rolo_version() {
    command="$ROLO -v"
    output="$($command)"
    echo "Output of command $command: '$output'"
    prog=$(grep AC_INIT\( configure.ac | cut -d[ -f2 | cut -d] -f1)
    version=$(grep AC_INIT\( configure.ac | cut -d[ -f3 | cut -d] -f1)
    echo "It must be: '$prog $version'"
    assertEquals "$prog $version" "$output"
}

test_rolo_startup_and_help() {
    echo hqq | TERM=dumb $ROLO -f test/contacts.vcf > /dev/null
}

. shunit2
