commit aac375bf0e892cea99ee9e2f5559e7fe8982431e parent d5045a4d696c6cdd911bb395668587be3dcd328a Author: vx_clutch <[email protected]> Date: Fri, 12 Sep 2025 12:08:39 -0400 Update run_unit_tests.sh Diffstat:
| M | src/tests/run_unit_tests.sh | | | 13 | ++++++++++--- |
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/tests/run_unit_tests.sh b/src/tests/run_unit_tests.sh @@ -1,11 +1,18 @@ #!/bin/sh +yait="$(pwd)/bin/yait" + fatal() { echo "fatal: $*" >&2 exit 1 } -[ -d "./tests" ] || fatal "must be run from parent directory" +[ -d "./yait" ] && fatal "must be run from parent directory" + +$yait --help > /dev/null/ 2>&1 || fatal "failed on --help" +$yait --version > /dev/null 2>&1 || fatal "failed on --version" + +tmpd=$(mktemp -d) +cd $tmpd -./bin/yait --help 2>&1 || fatal "failed on --help" -./bin/yait --version 2>&1 || fatal "failed on --version" +$yait foo || fatal "failed to create `foo` at ${tmpd}"