anymap/test
Chris Morgan 0a1c85f865 no_std support
I’m quite pleased with how this has turned out.

Given the stability-despite-instability of hashbrown (that the API
surface we’re depending on hasn’t changed since 0.1.1), and the
deliberate altered SemVer guarantees for it, it was very tempting
to leave the hashbrown range open, `version = ">=0.1.1"` or at least
`version = ">=0.1.1, <1"`, but for some reason or other I ended up
deciding not to. I’m still of two minds about it, really.
2022-01-26 00:16:15 +11:00

27 lines
979 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
set -e
export RUSTFLAGS="-D warnings"
export RUSTDOCFLAGS="-D warnings"
run_tests() {
for release in "" "--release"; do
cargo $1 test $release --no-default-features --features hashbrown
cargo $1 test $release --features hashbrown
# (2>/dev/null because otherwise youll keep seeing errors and double-guessing whether they were supposed to happen or whether the script failed to exit nonzero.)
! 2>/dev/null cargo $1 test $release --no-default-features || ! echo "'cargo $1 test $release --no-default-features' failed to fail (sorry, its stderr is suppressed, try it manually)"
cargo $1 test $release
done
}
# Wed like to test with the oldest declared-supported version of *all* our dependencies.
# That means Rust 1.36.0 + hashbrown 0.1.1.
# Hence the different lock file.
# (Also Rust 1.36.0 cant read the latest lock file format.)
cp test-oldest-Cargo.lock Cargo.lock
run_tests +1.36.0
rm Cargo.lock
run_tests
cargo clippy
cargo bench
cargo doc