()
| 196 | ignore = "bug: miri is failing for `eyre`, this is unrelated to our implementation" |
| 197 | )] |
| 198 | fn eyre_output() { |
| 199 | install_eyre_hook(); |
| 200 | |
| 201 | let eyre = eyre::eyre!(RootError) |
| 202 | .wrap_err(PrintableA(0)) |
| 203 | .wrap_err(PrintableB(0)); |
| 204 | |
| 205 | let eyre_debug_normal = format!("{eyre:?}"); |
| 206 | let eyre_debug_extended = format!("{eyre:#?}"); |
| 207 | let eyre_display_normal = format!("{eyre:}"); |
| 208 | let eyre_display_extended = format!("{eyre:#}"); |
| 209 | |
| 210 | let eyre_report = Err::<(), _>(eyre) |
| 211 | .into_report() |
| 212 | .expect_err("should have returned error"); |
| 213 | let context = eyre_report.current_context(); |
| 214 | |
| 215 | let context_debug_normal = format!("{context:?}"); |
| 216 | let context_debug_extended = format!("{context:#?}"); |
| 217 | let context_display_normal = format!("{context:}"); |
| 218 | let context_display_extended = format!("{context:#}"); |
| 219 | |
| 220 | assert_eq!(eyre_debug_normal, context_debug_normal); |
| 221 | assert_eq!(eyre_debug_extended, context_debug_extended); |
| 222 | assert_eq!(eyre_display_normal, context_display_normal); |
| 223 | assert_eq!(eyre_display_extended, context_display_extended); |
| 224 | } |
nothing calls this directly
no test coverage detected