mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 23:26:36 +00:00
Update e2e-test-strategies
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
f66c3016f3
commit
08e34e66b9
2 changed files with 30 additions and 4 deletions
19
e2e-tests/manifests/strategies-test-Cargo2.toml
Normal file
19
e2e-tests/manifests/strategies-test-Cargo2.toml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[package]
|
||||||
|
name = "cargo-update"
|
||||||
|
repository = "https://github.com/nabijaczleweli/cargo-update"
|
||||||
|
version = "11.1.2"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "cargo-install-update"
|
||||||
|
path = "src/main.rs"
|
||||||
|
test = false
|
||||||
|
doc = false
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "cargo-install-update-config"
|
||||||
|
path = "src/main-config.rs"
|
||||||
|
test = false
|
||||||
|
doc = false
|
||||||
|
|
||||||
|
[package.metadata.binstall]
|
||||||
|
disabled-strategies = ["quick-install"]
|
|
@ -50,10 +50,17 @@ if [ "$exit_code" != 94 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -euxo pipefail
|
set +e
|
||||||
|
|
||||||
|
"./$1" binstall --disable-strategies compile --no-confirm --manifest-path "manifests/strategies-test-Cargo2.toml" 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 overriding `disabled-strategies=["compile"]` in Cargo.toml
|
## Test --strategies overriding `disabled-strategies=["compile"]` in Cargo.toml
|
||||||
"./$1" binstall --no-confirm --manifest-path "manifests/strategies-test-override-Cargo.toml" --strategies compile cargo-quickinstall@0.2.10
|
"./$1" binstall --no-confirm --manifest-path "manifests/strategies-test-override-Cargo.toml" --strategies compile cargo-quickinstall@0.2.10
|
||||||
|
|
||||||
## Test --disable-strategies overriding `disabled-strategies=["compile"]` in Cargo.toml
|
|
||||||
"./$1" binstall --no-confirm --manifest-path "manifests/strategies-test-override-Cargo.toml" --disable-strategies crate-meta-data,quick-install --force cargo-quickinstall@0.2.10
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue