INNER CODE UNIT · Shell

err

chaifeng/ufw-docker · test.sh:16

function err() {
    printf "\n\e[1;37;41;m%s\e[0;m\n\n" "$@"
} >&2

retval=0
cd "$(dirname "${BASH_SOURCE}")"
for file in test/*.test.sh; do
    out "Running $file"
    if grep -E "^[[:blank:]]*BACH_TESTS=.+" "$file"; then
        err "Found defination of BACH_TESTS in $file"
        retval=1
    fi
    bash "$file" || retval=1
done

if [[ "$retval" -ne 0 ]]; then
    err "Test failed!"
fi

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…