Skip to content

Commit

Permalink
Merge pull request #144 from epage/s
Browse files Browse the repository at this point in the history
chore: Upgrade to snapbox 0.6
  • Loading branch information
epage authored Jun 4, 2024
2 parents e9157c3 + ec2d612 commit 1da0106
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/custom-panic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ release = false
human-panic = { path = "../.." }

[dev-dependencies]
snapbox = { version = "0.5.9", features = ["cmd"] }
snapbox = { version = "0.6.4", features = ["cmd"] }
13 changes: 7 additions & 6 deletions tests/custom-panic/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
fn release() {
snapbox::cmd::Command::new(snapbox::cmd::cargo_bin!("custom-panic-test"))
.assert()
.stderr_matches(snapbox::str![[r#"
.stderr_eq(snapbox::str![[r#"
Well, this is embarrassing.
custom-panic-test had a problem and crashed. To help us diagnose the problem you can send us a crash report.
Expand All @@ -29,10 +29,11 @@ fn release() {
fn debug() {
snapbox::cmd::Command::new(snapbox::cmd::cargo_bin!("custom-panic-test"))
.assert()
.stderr_matches(snapbox::str![[r#"
thread 'main' panicked at tests/custom-panic/src/main.rs:11:5:
OMG EVERYTHING IS ON FIRE!!!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
"#]])
.stderr_eq(snapbox::str![[r#"
thread 'main' panicked at tests/custom-panic/src/main.rs:11:5:
OMG EVERYTHING IS ON FIRE!!!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
"#]])
.code(101);
}
2 changes: 1 addition & 1 deletion tests/single-panic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ release = false
human-panic = { path = "../.." }

[dev-dependencies]
snapbox = { version = "0.5.9", features = ["cmd"] }
snapbox = { version = "0.6.4", features = ["cmd"] }
13 changes: 7 additions & 6 deletions tests/single-panic/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
fn release() {
snapbox::cmd::Command::new(snapbox::cmd::cargo_bin!("single-panic-test"))
.assert()
.stderr_matches(snapbox::str![[r#"
.stderr_eq(snapbox::str![[r#"
Well, this is embarrassing.
single-panic-test had a problem and crashed. To help us diagnose the problem you can send us a crash report.
Expand All @@ -24,10 +24,11 @@ fn release() {
fn debug() {
snapbox::cmd::Command::new(snapbox::cmd::cargo_bin!("single-panic-test"))
.assert()
.stderr_matches(snapbox::str![[r#"
thread 'main' panicked at tests/single-panic/src/main.rs:7:5:
OMG EVERYTHING IS ON FIRE!!!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
"#]])
.stderr_eq(snapbox::str![[r#"
thread 'main' panicked at tests/single-panic/src/main.rs:7:5:
OMG EVERYTHING IS ON FIRE!!!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
"#]])
.code(101);
}

0 comments on commit 1da0106

Please sign in to comment.