fix: miri tests

This commit is contained in:
Freja Roberts 2023-12-11 14:37:24 +01:00
parent e3fd62079a
commit e61cf4eb3c
2 changed files with 5 additions and 0 deletions

View File

@ -166,6 +166,8 @@ pub trait Section: crate::private::Sealed {
/// ```rust
/// use color_eyre::{eyre::eyre, eyre::Report, Section, SectionExt};
///
/// # #[cfg(not(miri))]
/// # {
/// let output = std::process::Command::new("ls")
/// .output()?;
///
@ -178,6 +180,7 @@ pub trait Section: crate::private::Sealed {
/// };
///
/// println!("{}", output);
/// # }
/// # Ok::<_, Report>(())
/// ```
fn with_section<D, F>(self, section: F) -> Self::Return

View File

@ -39,6 +39,7 @@ static ERROR_FILE_NAME: &str = "theme_error_control_spantrace.txt";
static ERROR_FILE_NAME: &str = "theme_error_control.txt";
#[test]
#[cfg(not(miri))]
fn test_error_backwards_compatibility() {
setup();
let error = get_error("test");
@ -102,6 +103,7 @@ static PANIC_FILE_NAME: &str = "theme_panic_control.txt";
#[test]
#[allow(unused_mut)]
#[allow(clippy::vec_init_then_push)]
#[cfg(not(miri))]
fn test_panic_backwards_compatibility() {
let mut features: Vec<&str> = vec![];
#[cfg(feature = "capture-spantrace")]