test(trim-paths): use --config CLI to change options

This commit is contained in:
Weihang Lo 2023-12-08 10:46:11 -05:00
parent 232f91368f
commit 985d49b916
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7

View File

@ -523,22 +523,9 @@ fn object_works_helper(run: impl Fn(&std::path::Path) -> Vec<u8>) {
p.cargo("clean").run();
p.change_file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.0.1"
[dependencies]
bar = "0.0.1"
[profile.dev]
trim-paths = "object"
"#,
);
p.cargo("build --verbose -Ztrim-paths")
.arg("--config")
.arg(r#"profile.dev.trim-paths="object""#)
.masquerade_as_nightly_cargo(&["-Ztrim-paths"])
.with_stderr(&format!(
"\