mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Use snapshots instead of matching on parts of the output
Personally I liked that the test was only dependent on what really matters, the lack of presence of a particular filename. Now the test would fail if Cargo one day adds more (generated) files to the package. Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
This commit is contained in:
parent
2c3f8d87c4
commit
af92c4445b
@ -4249,6 +4249,13 @@ fn simple_with_fifo() {
|
|||||||
// would also be read eventually.
|
// would also be read eventually.
|
||||||
git_project
|
git_project
|
||||||
.cargo("package -l")
|
.cargo("package -l")
|
||||||
.with_stdout_does_not_contain("blocks-when-read")
|
.with_stdout_data(str![[r#"
|
||||||
|
.cargo_vcs_info.json
|
||||||
|
Cargo.lock
|
||||||
|
Cargo.toml
|
||||||
|
Cargo.toml.orig
|
||||||
|
src/main.rs
|
||||||
|
|
||||||
|
"#]])
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
@ -6899,6 +6899,12 @@ fn simple_with_fifo() {
|
|||||||
// Avoid actual blocking even in case of failure, assuming that what it lists here
|
// Avoid actual blocking even in case of failure, assuming that what it lists here
|
||||||
// would also be read eventually.
|
// would also be read eventually.
|
||||||
p.cargo("package -l")
|
p.cargo("package -l")
|
||||||
.with_stdout_does_not_contain("blocks-when-read")
|
.with_stdout_data(str![[r#"
|
||||||
|
Cargo.lock
|
||||||
|
Cargo.toml
|
||||||
|
Cargo.toml.orig
|
||||||
|
src/main.rs
|
||||||
|
|
||||||
|
"#]])
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user