navi/test/core.sh
2019-09-21 19:24:09 -03:00

19 lines
No EOL
247 B
Bash

#!/usr/bin/env bash
source "${SCRIPT_DIR}/src/main.sh"
test::success() {
echo "Test passed!"
}
test::fail() {
echo "Test failed..."
exit 42
}
test::run() {
echo
echo "-> $1"
shift
eval "$*" && test::success || test::fail
}