19 lines
406 B
Bash
Executable file
19 lines
406 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
SCRIPT_DIR="$(cd -- "$(dirname -- "$0")" && pwd)"
|
|
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}"
|
|
${JQ} -n -r -L . -L "dropins/${JQ_FLAVOR}" "include \"tests\"; testsMain"
|
|
}
|
|
|
|
runTests
|
|
|
|
if command -v gojq 2>/dev/null >/dev/null; then
|
|
JQ=gojq JQ_FLAVOR=gojq runTests
|
|
fi |