Skip to content

Commit

Permalink
test(freshness): Reduce globbing after switching to Snapbox
Browse files Browse the repository at this point in the history
  • Loading branch information
choznerol committed Jun 29, 2024
1 parent 3f80722 commit 34af338
Showing 1 changed file with 35 additions and 9 deletions.
44 changes: 35 additions & 9 deletions tests/testsuite/freshness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,19 @@ fn modifying_and_moving() {
p.cargo("build")
.with_status(101)
.with_stderr_data(str![[r#"
...
[..]file not found[..]
...
[COMPILING] foo v0.0.1 ([ROOT]/foo)
error[E0583]: file not found for module `a`
--> src/main.rs:1:1
|
1 | mod a; fn main() {}
| ^^^^^^
|
= [HELP] to create the module `a`, create file "src/a.rs" or "src/a/mod.rs"
= [NOTE] if there is a `mod a` elsewhere in the crate already, import it with `use crate::...` instead
For more information about this error, try `rustc --explain E0583`.
[ERROR] could not compile `foo` (bin "foo") due to 1 previous error
"#]])
.run();
}
Expand Down Expand Up @@ -1943,9 +1953,17 @@ fn script_fails_stay_dirty() {
.with_stderr_data(str![[r#"
[COMPILING] foo v0.0.1 ([ROOT]/foo)
[ERROR] failed to run custom build command for `foo v0.0.1 ([ROOT]/foo)`
...
[..]Crash!
...
Caused by:
process didn't exit successfully: `[ROOT]/foo/target/debug/build/foo-[HASH]/build-script-build` ([EXIT_STATUS]: 101)
--- stdout
cargo::rerun-if-changed=build.rs
--- stderr
thread 'main' panicked at helper.rs:1:16:
Crash!
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
"#]])
.with_status(101)
.run();
Expand All @@ -1954,9 +1972,17 @@ fn script_fails_stay_dirty() {
.with_stderr_data(str![[r#"
[COMPILING] foo v0.0.1 ([ROOT]/foo)
[ERROR] failed to run custom build command for `foo v0.0.1 ([ROOT]/foo)`
...
[..]Crash!
...
Caused by:
process didn't exit successfully: `[ROOT]/foo/target/debug/build/foo-[HASH]/build-script-build` ([EXIT_STATUS]: 101)
--- stdout
cargo::rerun-if-changed=build.rs
--- stderr
thread 'main' panicked at helper.rs:1:16:
Crash!
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
"#]])
.with_status(101)
.run();
Expand Down

0 comments on commit 34af338

Please sign in to comment.