journal/runTests.sh

21 lines
467 B
Bash
Raw Normal View History

2024-11-07 08:58:38 +00:00
#!/usr/bin/env bash
SCRIPT_DIR="$(cd -- "$(dirname -- "$0")" && pwd)"
2024-11-07 21:45:22 +00:00
cd "${SCRIPT_DIR}/tool" || return
export JQ_TYPECHECKING=1
runTests() {
JQ=${JQ:-jq}
export JQ_FLAVOR=${JQ_FLAVOR:-jq}
echo "Running Tests with JQ=${JQ}"
2024-11-09 00:57:22 +00:00
${JQ} -nr \
-L "$(realpath .)" -L "$(realpath ./lib)" -L "$(realpath ./dropins)/${JQ_FLAVOR}" \
"include \"tests\"; testsMain"
2024-11-07 21:45:22 +00:00
}
2024-11-07 08:58:38 +00:00
2024-11-07 21:45:22 +00:00
runTests
2024-11-07 11:39:39 +00:00
2024-11-07 21:45:22 +00:00
if command -v gojq 2>/dev/null >/dev/null; then
JQ=gojq JQ_FLAVOR=gojq runTests
fi