Files
ureq/test.sh
Jacob Hoffman-Andrews b58a3a53b0 Add test.sh. (#173)
This emulates the test matrix that gets run in CI, making it easier to
find failures locally.

There was one conflict in the matrix: when JSON is enabled and TLS is
disabled, two of the doctests would fail. This was previous worked
around as an exclude in the github workflow. I changed the JSON doctest
to use HTTP instead.
2020-10-03 20:47:35 -07:00

17 lines
479 B
Bash
Executable File

#!/bin/bash
set -eu
export RUST_BACKTRACE=1
export RUSTFLAGS="-D dead_code -D unused-variables -D unused"
for tls in "" tls native-tls ; do
for feature in "" json charset cookies socks-proxy ; do
for what in --doc --tests ; do
if ! cargo test "${what}" --no-default-features --features "${tls} ${feature}" ; then
echo Command failed: cargo test \"${what}\" --no-default-features --features \"${tls} ${feature}\"
exit 1
fi
done
done
done