zsh-autosuggestions/script/test_runner.zsh

30 lines
475 B
Bash
Raw Permalink Normal View History

2016-03-06 04:53:07 +01:00
#!/usr/bin/env zsh
2016-03-14 23:50:24 +01:00
DIR="${0:a:h}"
2016-03-06 04:53:07 +01:00
ROOT_DIR="$DIR/.."
TEST_DIR="$ROOT_DIR/test"
header() {
local message="$1"
cat <<-EOF
#====================================================================#
# $message
#====================================================================#
EOF
}
local -a tests
# Test suites to run
tests=($TEST_DIR/**/*_test.zsh)
local retval=0
for suite in $tests; do
header "${suite#"$TEST_DIR"}"
zsh -f "$suite" || retval=$?
done
exit retval