#!/usr/bin/env bash
#
# Run `cargo test` for every crate with the default features

set -euo pipefail

: "${CARGO:=cargo}"

x () {
    echo ": $*"
    "$@"
}

for crate in $(maint/list_crates --all); do
    echo ==================== "$crate" ====================
    # allow $CARGO to contain multiple words
    # shellcheck disable=SC2086
    x $CARGO test -p "$crate" --all-targets
done
