diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-10-11 14:31:11 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-10-11 14:31:37 -0400 |
| commit | bb9133a79389f8ff7c79cad18884b5f5c7eade5c (patch) | |
| tree | e905a9a12c63875e37a87e9cc9da2a1e27000af8 /scripts/test.sh | |
| parent | Add unicode support to justify (diff) | |
| download | cli-bb9133a79389f8ff7c79cad18884b5f5c7eade5c.zip | |
Migrate to sourcehut build system and remove gha workflows
Diffstat (limited to 'scripts/test.sh')
| -rwxr-xr-x | scripts/test.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/test.sh b/scripts/test.sh new file mode 100755 index 0000000..ea35ef7 --- /dev/null +++ b/scripts/test.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail + +main() { + echo "Running tests..." + local ctest_result=0 + local bats_result=0 + + if ! (cd build && ctest --output-on-failure); then + ctest_result=1 + fi + if ! ./tests/vendor/bats-core/bin/bats ./tests/justify.bats; then + bats_result=1 + fi + exit $((ctest_result || bats_result)) +} + +main "$@" |