bat-extras/test/run.sh

22 lines
353 B
Bash
Raw Normal View History

2019-06-20 01:54:23 +02:00
#!/usr/bin/env bash
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
FAIL=false
ACTION="snapshot-test"
if [ -n "$1" ]; then
ACTION="$1"
fi
for test in "$HERE"/tests/*.sh; do
test_name="$(basename "$test" .sh)"
bash "$HERE/util/test.sh" "$ACTION" "$test_name"
if [ $? -ne 0 ]; then
FAIL=true
fi
done
if [ "$FAIL" = true ]; then
exit 1
fi