mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-25 06:40:03 +00:00
e2e-tests: Check version of installed crates (#1119)
and also test `fetch_crate_cratesio_version_matched` in `e2e-tests/live.sh`. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
f1bfe23672
commit
b876bdc8c7
5 changed files with 67 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -uxo pipefail
|
||||
set -euxo pipefail
|
||||
|
||||
unset CARGO_INSTALL_ROOT
|
||||
|
||||
|
@ -9,18 +9,26 @@ export CARGO_HOME
|
|||
export PATH="$CARGO_HOME/bin:$PATH"
|
||||
|
||||
## Test --disable-strategies
|
||||
set +e
|
||||
|
||||
"./$1" binstall --no-confirm --disable-strategies quick-install,compile cargo-update@11.1.2
|
||||
exit_code="$?"
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$exit_code" != 94 ]; then
|
||||
echo "Expected exit code 94, but actual exit code $exit_code"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Test --strategies
|
||||
set +e
|
||||
|
||||
"./$1" binstall --no-confirm --strategies crate-meta-data cargo-update@11.1.2
|
||||
exit_code="$?"
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$exit_code" != 94 ]; then
|
||||
echo "Expected exit code 94, but actual exit code $exit_code"
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue