From e61cf4eb3cf0495a312bd8349056bcb40d63f58b Mon Sep 17 00:00:00 2001 From: Freja Roberts Date: Mon, 11 Dec 2023 14:37:24 +0100 Subject: [PATCH] fix: miri tests --- color-eyre/src/section/mod.rs | 3 +++ color-eyre/tests/theme.rs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/color-eyre/src/section/mod.rs b/color-eyre/src/section/mod.rs index 4455890..f7b5b68 100644 --- a/color-eyre/src/section/mod.rs +++ b/color-eyre/src/section/mod.rs @@ -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(self, section: F) -> Self::Return diff --git a/color-eyre/tests/theme.rs b/color-eyre/tests/theme.rs index e976c9a..1e8d2e5 100644 --- a/color-eyre/tests/theme.rs +++ b/color-eyre/tests/theme.rs @@ -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")]