-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathintegration.rs
More file actions
39 lines (30 loc) · 1.29 KB
/
integration.rs
File metadata and controls
39 lines (30 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#[test]
#[cfg_attr(debug_assertions, ignore)]
fn release() {
snapbox::cmd::Command::new(snapbox::cmd::cargo_bin!("custom-panic-test"))
.assert()
.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.
We have generated a report file at "[..].toml". Please attach this crash report to your support request.
- Homepage: www.mycompany.com
- Authors: My Company Support <[email protected]
To submit the crash report:
- Open a support request by email to [email protected]
We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.
Thank you kindly!
"#]])
.code(101);
}
#[test]
#[cfg_attr(not(debug_assertions), ignore)]
fn debug() {
snapbox::cmd::Command::new(snapbox::cmd::cargo_bin!("custom-panic-test"))
.assert()
.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);
}